… | |
… | |
225 | { |
225 | { |
226 | cinfo.dct_method = JDCT_FASTEST; |
226 | cinfo.dct_method = JDCT_FASTEST; |
227 | cinfo.do_fancy_upsampling = FALSE; |
227 | cinfo.do_fancy_upsampling = FALSE; |
228 | |
228 | |
229 | while (cinfo.scale_denom < 8 |
229 | while (cinfo.scale_denom < 8 |
230 | && (cinfo.output_width >> 1) >= IW |
230 | && cinfo.output_width >= IW*4 |
231 | && (cinfo.output_height >> 1) >= IH) |
231 | && cinfo.output_height >= IH*4) |
232 | { |
232 | { |
233 | cinfo.scale_denom <<= 1; |
233 | cinfo.scale_denom <<= 1; |
234 | jpeg_calc_output_dimensions (&cinfo); |
234 | jpeg_calc_output_dimensions (&cinfo); |
235 | } |
235 | } |
236 | } |
236 | } |
… | |
… | |
313 | OUTPUT: |
313 | OUTPUT: |
314 | RETVAL |
314 | RETVAL |
315 | |
315 | |
316 | GdkPixbuf_noinc * |
316 | GdkPixbuf_noinc * |
317 | p7_to_pb (int w, int h, guchar *src) |
317 | p7_to_pb (int w, int h, guchar *src) |
|
|
318 | PROTOTYPE: @ |
318 | CODE: |
319 | CODE: |
319 | { |
320 | { |
320 | int x, y; |
321 | int x, y; |
321 | guchar *dst, *d; |
322 | guchar *dst, *d; |
322 | int dstr; |
323 | int dstr; |