Browse Source

fixed GIFInputFuncData struct style

v1.x
Tj Holowaychuk 14 years ago
parent
commit
e827187a5a
  1. 15
      src/Image.cc

15
src/Image.cc

@ -391,17 +391,20 @@ Image::loadGIF() {
return result; return result;
} }
/*
* Load give from `buf` and the given `len`.
*/
cairo_status_t cairo_status_t
Image::loadGIFFromBuffer(uint8_t *buf, unsigned len) { Image::loadGIFFromBuffer(uint8_t *buf, unsigned len) {
int imageIdx = 0; int imageIdx = 0;
GifFileType* gft; GifFileType* gft;
struct GIFInputFuncData gifd = struct GIFInputFuncData gifd = {
{ buf: buf
buf: buf, , length: len
length: len, , cpos: 0
cpos: 0 };
};
if((gft = DGifOpen((void*) &gifd, readGIFFromMemory)) == NULL) if((gft = DGifOpen((void*) &gifd, readGIFFromMemory)) == NULL)
return CAIRO_STATUS_READ_ERROR; return CAIRO_STATUS_READ_ERROR;

Loading…
Cancel
Save