Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.io.image
Commits
c90b8a25
Commit
c90b8a25
authored
Sep 01, 2014
by
Manuel Günther
Browse files
Fixed issue with GIFLIB version>=5.1
parent
ce850d33
Changes
2
Hide whitespace changes
Inline
Side-by-side
bob/io/image/gif.cpp
View file @
c90b8a25
...
...
@@ -277,6 +277,15 @@ QuantizeBuffer(unsigned int Width, unsigned int Height, int *ColorMapSize,
#endif // End of ugly QuantizeBuffer definition for giflib 4.2
static
int
DGifDeleter
(
GifFileType
*
ptr
){
#if defined(GIF_LIB_VERSION) || (GIFLIB_MAJOR < 5) || (GIFLIB_MAJOR == 5) && (GIFLIB_MINOR < 1)
return
DGifCloseFile
(
ptr
);
#else
int
error
;
return
DGifCloseFile
(
ptr
,
&
error
);
#endif
}
static
boost
::
shared_ptr
<
GifFileType
>
make_dfile
(
const
char
*
filename
)
{
#if defined(GIF_LIB_VERSION) || (GIFLIB_MAJOR < 5)
...
...
@@ -290,7 +299,17 @@ static boost::shared_ptr<GifFileType> make_dfile(const char *filename)
m
%
filename
;
throw
std
::
runtime_error
(
m
.
str
());
}
return
boost
::
shared_ptr
<
GifFileType
>
(
fp
,
DGifCloseFile
);
return
boost
::
shared_ptr
<
GifFileType
>
(
fp
,
DGifDeleter
);
}
static
int
EGifDeleter
(
GifFileType
*
ptr
){
#if defined(GIF_LIB_VERSION) || (GIFLIB_MAJOR < 5) || (GIFLIB_MAJOR == 5) && (GIFLIB_MINOR < 1)
return
EGifCloseFile
(
ptr
);
#else
int
error
;
return
EGifCloseFile
(
ptr
,
&
error
);
#endif
}
static
boost
::
shared_ptr
<
GifFileType
>
make_efile
(
const
char
*
filename
)
...
...
@@ -306,7 +325,7 @@ static boost::shared_ptr<GifFileType> make_efile(const char *filename)
m
%
filename
;
throw
std
::
runtime_error
(
m
.
str
());
}
return
boost
::
shared_ptr
<
GifFileType
>
(
fp
,
EGif
CloseFile
);
return
boost
::
shared_ptr
<
GifFileType
>
(
fp
,
EGif
Deleter
);
}
/**
...
...
buildout.cfg
View file @
c90b8a25
...
...
@@ -17,6 +17,7 @@ develop = src/bob.extension
; options for bob.buildout extension
debug = true
verbose = true
newest = false
[sources]
bob.extension = git https://github.com/bioidiap/bob.extension
...
...
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