Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.io.image
Commits
e4efd614
Commit
e4efd614
authored
Jun 08, 2017
by
Manuel Günther
Browse files
inlined non-templated functions implemented in header
parent
ac6bbd5f
Pipeline
#10480
passed with stages
in 16 minutes and 34 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/io/image/include/bob.io.image/image.h
View file @
e4efd614
...
...
@@ -60,7 +60,7 @@ inline blitz::Array<uint8_t,3> read_color_image(const std::string& filename, std
throw
std
::
runtime_error
(
"The filename extension '"
+
extension
+
"' is not known or not supported for color images"
);
}
blitz
::
Array
<
uint8_t
,
2
>
read_gray_image
(
const
std
::
string
&
filename
,
std
::
string
extension
=
""
){
inline
blitz
::
Array
<
uint8_t
,
2
>
read_gray_image
(
const
std
::
string
&
filename
,
std
::
string
extension
=
""
){
if
(
extension
.
empty
())
extension
=
boost
::
filesystem
::
path
(
filename
).
extension
().
string
();
boost
::
algorithm
::
to_lower
(
extension
);
...
...
@@ -80,7 +80,7 @@ blitz::Array<uint8_t,2> read_gray_image(const std::string& filename, std::string
}
void
write_color_image
(
const
blitz
::
Array
<
uint8_t
,
3
>&
image
,
const
std
::
string
&
filename
,
std
::
string
extension
=
""
){
inline
void
write_color_image
(
const
blitz
::
Array
<
uint8_t
,
3
>&
image
,
const
std
::
string
&
filename
,
std
::
string
extension
=
""
){
if
(
extension
.
empty
())
extension
=
boost
::
filesystem
::
path
(
filename
).
extension
().
string
();
boost
::
algorithm
::
to_lower
(
extension
);
...
...
@@ -102,7 +102,7 @@ void write_color_image(const blitz::Array<uint8_t,3>& image, const std::string&
throw
std
::
runtime_error
(
"The filename extension '"
+
extension
+
"' is not known or not supported for color images"
);
}
void
write_gray_image
(
const
blitz
::
Array
<
uint8_t
,
2
>&
image
,
const
std
::
string
&
filename
,
std
::
string
extension
=
""
){
inline
void
write_gray_image
(
const
blitz
::
Array
<
uint8_t
,
2
>&
image
,
const
std
::
string
&
filename
,
std
::
string
extension
=
""
){
if
(
extension
.
empty
())
extension
=
boost
::
filesystem
::
path
(
filename
).
extension
().
string
();
boost
::
algorithm
::
to_lower
(
extension
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment