ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/CV/CV.xs
(Generate patch)

Comparing CV/CV.xs (file contents):
Revision 1.46 by root, Sat Jul 4 05:31:17 2015 UTC vs.
Revision 1.47 by root, Tue Jun 7 06:59:57 2016 UTC

311 perlinterp_acquire (); 311 perlinterp_acquire ();
312 OUTPUT: 312 OUTPUT:
313 RETVAL 313 RETVAL
314 314
315GdkPixbuf_noinc * 315GdkPixbuf_noinc *
316load_jpeg (SV *path, int thumbnail=0) 316load_jpeg (SV *path, int thumbnail = 0, int iw = 0, int ih = 0)
317 CODE: 317 CODE:
318{ 318{
319 struct jpeg_decompress_struct cinfo; 319 struct jpeg_decompress_struct cinfo;
320 struct jpg_err_mgr jerr; 320 struct jpg_err_mgr jerr;
321 guchar *data; 321 guchar *data;
369 { 369 {
370 cinfo.dct_method = JDCT_FASTEST; 370 cinfo.dct_method = JDCT_FASTEST;
371 cinfo.do_fancy_upsampling = FALSE; 371 cinfo.do_fancy_upsampling = FALSE;
372 372
373 while (cinfo.scale_denom < 8 373 while (cinfo.scale_denom < 8
374 && cinfo.output_width >= IW*4 374 && cinfo.output_width >= iw*4
375 && cinfo.output_height >= IH*4) 375 && cinfo.output_height >= ih*4)
376 { 376 {
377 cinfo.scale_denom <<= 1; 377 cinfo.scale_denom <<= 1;
378 jpeg_calc_output_dimensions (&cinfo); 378 jpeg_calc_output_dimensions (&cinfo);
379 } 379 }
380 } 380 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines