Lines Matching defs:gif
41 "images.gif.suppressDecoderWarnings", true,
42 "Suppress GIF warnings and errors when calling image decode "
46 /* Implement the GIF interlace algorithm in an iterator.
118 static const ColorMapObject* find_colormap(const GifFileType* gif) {
119 const ColorMapObject* cmap = gif->Image.ColorMap;
121 cmap = gif->SColorMap;
172 * Skip rows in the source gif image.
173 * @param gif Source image.
174 * @param dst Scratch output needed by gif library call. Must be >= width bytes.
179 static bool skip_src_rows(GifFileType* gif, uint8_t* dst, int width, int rowsToSkip) {
181 if (DGifGetLine(gif, dst, width) == GIF_ERROR) {
190 GifFileType* gif = DGifOpen(sk_stream, DecodeCallBackProc);
192 GifFileType* gif = DGifOpen(sk_stream, DecodeCallBackProc, NULL);
194 if (NULL == gif) {
198 SkAutoTCallIProc<GifFileType, DGifCloseFile> acp(gif);
212 int fillIndex = gif->SBackGroundColor;
215 if (DGifGetRecordType(gif, &recType) == GIF_ERROR) {
221 if (DGifGetImageDesc(gif) == GIF_ERROR) {
225 if (gif->ImageCount < 1) { // sanity check
229 width = gif->SWidth;
230 height = gif->SHeight;
232 SavedImage* image = &gif->SavedImages[gif->ImageCount-1];
289 const ColorMapObject* cmap = find_colormap(gif);
315 // gif->SBackGroundColor should be less than colorCount.
337 // GIF has an option to store the scanlines of an image, plus a larger background,
372 if (gif->Image.Interlace) {
377 if (DGifGetLine(gif, scanline, innerWidth) == GIF_ERROR) {
392 skip_src_rows(gif, scanline, innerWidth, sampler.srcY0());
394 if (DGifGetLine(gif, scanline, innerWidth) == GIF_ERROR) {
405 skip_src_rows(gif, scanline, innerWidth, sampler.srcDY() - 1);
411 skip_src_rows(gif, scanline, innerWidth, innerHeight - read);
418 if (DGifGetExtension(gif, &temp_save.Function,
421 if (DGifGetExtension(gif, &extFunction, &extData) == GIF_ERROR) {
432 if (GifAddExtensionBlock(&gif->ExtensionBlockCount,
433 &gif->ExtensionBlocks,
440 if (DGifGetExtensionNext(gif, &extData) == GIF_ERROR) {