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
0e259c40
Commit
0e259c40
authored
Dec 08, 2014
by
Davis King
Browse files
Clarified the error message a user gets when they try to load a jpeg or png file
but didn't link to the approrpiate library.
parent
aba052ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
dlib/image_loader/load_image.h
dlib/image_loader/load_image.h
+12
-2
No files found.
dlib/image_loader/load_image.h
View file @
0e259c40
...
...
@@ -70,11 +70,21 @@ namespace dlib
}
if
(
im_type
==
image_file_type
::
JPG
)
throw
image_load_error
(
"DLIB_JPEG_SUPPORT not #defined: Unable to load image in file "
+
file_name
);
{
throw
image_load_error
(
"Unable to load image in file "
+
file_name
+
".
\n
"
+
"You must #define DLIB_JPEG_SUPPORT and link to libjpeg to read JPEG files.
\n
"
+
"Do this by following the instructions at http://dlib.net/compile.html."
);
}
else
if
(
im_type
==
image_file_type
::
PNG
)
throw
image_load_error
(
"DLIB_PNG_SUPPORT not #defined: Unable to load image in file "
+
file_name
);
{
throw
image_load_error
(
"Unable to load image in file "
+
file_name
+
".
\n
"
+
"You must #define DLIB_PNG_SUPPORT and link to libpng to read PNG files.
\n
"
+
"Do this by following the instructions at http://dlib.net/compile.html."
);
}
else
{
throw
image_load_error
(
"Unknown image file format: Unable to load image in file "
+
file_name
);
}
}
}
...
...
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