Lines Matching refs:cinfo
76 struct jpeg_decompress_struct cinfo; /* JPEG decompression struct */ in readjpeg() local
96 cinfo.err = jpeg_std_error(&jerr); /* Set JPEG error handler to default */ in readjpeg()
98 jpeg_create_decompress(&cinfo); /* Create decompression context */ in readjpeg()
99 jpeg_stdio_src(&cinfo, ifp); /* Set input mechanism to stdio type */ in readjpeg()
100 jpeg_read_header(&cinfo, TRUE); /* Read the JPEG header for info */ in readjpeg()
101 jpeg_start_decompress(&cinfo); /* Prepare for actual decompression */ in readjpeg()
103 *xres = cinfo.output_width; /* set returned image width */ in readjpeg()
104 *yres = cinfo.output_height; /* set returned image height */ in readjpeg()
107 row_stride = cinfo.output_width * cinfo.output_components; in readjpeg()
110 *imgdata = (unsigned char *)malloc(row_stride * cinfo.output_height); in readjpeg()
113 while (cinfo.output_scanline < cinfo.output_height) { in readjpeg()
114 row_pointer[0] = &((*imgdata)[(cinfo.output_scanline) * row_stride]); in readjpeg()
115 jpeg_read_scanlines(&cinfo, row_pointer, 1); in readjpeg()
118 jpeg_finish_decompress(&cinfo); /* Tell the JPEG library to cleanup */ in readjpeg()
119 jpeg_destroy_decompress(&cinfo); /* Destroy JPEG decompression context */ in readjpeg()