Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
27dbbe2d
"examples/git@developer.sourcefind.cn:OpenDAS/dgl.git" did not exist on "195f99362d883f8b6d131b70a7868a537e55b786"
Commit
27dbbe2d
authored
May 19, 2018
by
Davis King
Browse files
Renamed dlib.save_rgb_image() to dlib.save_image()
parent
68112e35
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
tools/python/src/numpy_returns.cpp
tools/python/src/numpy_returns.cpp
+8
-3
No files found.
tools/python/src/numpy_returns.cpp
View file @
27dbbe2d
...
@@ -30,7 +30,8 @@ bool has_ending (std::string const full_string, std::string const &ending) {
...
@@ -30,7 +30,8 @@ bool has_ending (std::string const full_string, std::string const &ending) {
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
void
save_rgb_image
(
numpy_image
<
rgb_pixel
>
img
,
const
std
::
string
&
path
)
template
<
typename
T
>
void
save_image
(
numpy_image
<
T
>
img
,
const
std
::
string
&
path
)
{
{
std
::
string
lowered_path
=
path
;
std
::
string
lowered_path
=
path
;
std
::
transform
(
lowered_path
.
begin
(),
lowered_path
.
end
(),
lowered_path
.
begin
(),
::
tolower
);
std
::
transform
(
lowered_path
.
begin
(),
lowered_path
.
end
(),
lowered_path
.
begin
(),
::
tolower
);
...
@@ -123,8 +124,12 @@ void bind_numpy_returns(py::module &m)
...
@@ -123,8 +124,12 @@ void bind_numpy_returns(py::module &m)
py
::
arg
(
"path"
)
py
::
arg
(
"path"
)
);
);
m
.
def
(
"save_rgb_image"
,
&
save_rgb_image
,
m
.
def
(
"save_image"
,
&
save_image
<
rgb_pixel
>
,
"Saves the given (RGB) image to the specified path. Determines the file type from the file extension specified in the path"
,
"Saves the given image to the specified path. Determines the file type from the file extension specified in the path"
,
py
::
arg
(
"img"
),
py
::
arg
(
"path"
)
);
m
.
def
(
"save_image"
,
&
save_image
<
unsigned
char
>
,
"Saves the given image to the specified path. Determines the file type from the file extension specified in the path"
,
py
::
arg
(
"img"
),
py
::
arg
(
"path"
)
py
::
arg
(
"img"
),
py
::
arg
(
"path"
)
);
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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