Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
27dbbe2d
Commit
27dbbe2d
authored
May 19, 2018
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed dlib.save_rgb_image() to dlib.save_image()
parent
68112e35
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
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) {
// ----------------------------------------------------------------------------------------
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
::
transform
(
lowered_path
.
begin
(),
lowered_path
.
end
(),
lowered_path
.
begin
(),
::
tolower
);
...
...
@@ -123,8 +124,12 @@ void bind_numpy_returns(py::module &m)
py
::
arg
(
"path"
)
);
m
.
def
(
"save_rgb_image"
,
&
save_rgb_image
,
"Saves the given (RGB) image to the specified path. Determines the file type from the file extension specified in the path"
,
m
.
def
(
"save_image"
,
&
save_image
<
rgb_pixel
>
,
"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"
)
);
...
...
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