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
0ecb49b9
Commit
0ecb49b9
authored
May 20, 2019
by
Davis King
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'VirgileD-fix/jpeg'
parents
dedb7358
8746c9d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
23 deletions
+5
-23
CMakeLists.txt
dlib/CMakeLists.txt
+0
-22
jpeg_loader.cpp
dlib/image_loader/jpeg_loader.cpp
+5
-1
No files found.
dlib/CMakeLists.txt
View file @
0ecb49b9
...
...
@@ -520,7 +520,6 @@ if (NOT TARGET dlib)
external/libjpeg/jcparam.c
external/libjpeg/jcprepct.c
external/libjpeg/jcsample.c
external/libjpeg/jctrans.c
external/libjpeg/jdapimin.c
external/libjpeg/jdapistd.c
external/libjpeg/jdarith.c
...
...
@@ -537,39 +536,18 @@ if (NOT TARGET dlib)
external/libjpeg/jdmerge.c
external/libjpeg/jdpostct.c
external/libjpeg/jdsample.c
external/libjpeg/jdtrans.c
external/libjpeg/jerror.c
external/libjpeg/jerror.h
external/libjpeg/jfdctflt.c
external/libjpeg/jfdctfst.c
external/libjpeg/jfdctint.c
external/libjpeg/jidctflt.c
external/libjpeg/jidctfst.c
external/libjpeg/jidctint.c
external/libjpeg/jinclude.h
external/libjpeg/jmemansi.c
external/libjpeg/jmemmgr.c
external/libjpeg/jmemname.c
external/libjpeg/jmemnobs.c
external/libjpeg/jpegtran.c
external/libjpeg/jquant1.c
external/libjpeg/jquant2.c
external/libjpeg/jutils.c
external/libjpeg/rdbmp.c
external/libjpeg/rdcolmap.c
external/libjpeg/rdgif.c
external/libjpeg/rdjpgcom.c
external/libjpeg/rdppm.c
external/libjpeg/rdrle.c
external/libjpeg/rdswitch.c
external/libjpeg/rdtarga.c
external/libjpeg/transupp.c
external/libjpeg/wrbmp.c
external/libjpeg/wrgif.c
external/libjpeg/wrjpgcom.c
external/libjpeg/wrppm.c
external/libjpeg/wrrle.c
external/libjpeg/wrtarga.c
)
endif
()
set
(
source_files
${
source_files
}
...
...
dlib/image_loader/jpeg_loader.cpp
View file @
0ecb49b9
...
...
@@ -81,12 +81,16 @@ namespace dlib
{
jpeg_error_mgr
pub
;
/* "public" fields */
jmp_buf
setjmp_buffer
;
/* for return to caller */
char
jpegLastErrorMsg
[
JMSG_LENGTH_MAX
];
};
void
jpeg_loader_error_exit
(
j_common_ptr
cinfo
)
{
/* cinfo->err really points to a jpeg_loader_error_mgr struct, so coerce pointer */
jpeg_loader_error_mgr
*
myerr
=
(
jpeg_loader_error_mgr
*
)
cinfo
->
err
;
/* Create the message */
(
*
(
cinfo
->
err
->
format_message
)
)
(
cinfo
,
myerr
->
jpegLastErrorMsg
);
/* Return control to the setjmp point */
longjmp
(
myerr
->
setjmp_buffer
,
1
);
...
...
@@ -127,7 +131,7 @@ namespace dlib
*/
jpeg_destroy_decompress
(
&
cinfo
);
if
(
file
!=
NULL
)
fclose
(
file
);
throw
image_load_error
(
std
::
string
(
"jpeg_loader: error while loading image
"
)
);
throw
image_load_error
(
std
::
string
(
"jpeg_loader: error while loading image
: "
)
+
jerr
.
jpegLastErrorMsg
);
}
...
...
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