Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/epeg

Dir     : e17/libs/epeg/src/lib


Modified Files:
        epeg_main.c 


Log Message:


libjpeg changed behavior - you have to set defaults AFTYER setting jinfo out
now...  wtf?

===================================================================
RCS file: /cvs/e/e17/libs/epeg/src/lib/epeg_main.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- epeg_main.c 7 Jun 2006 23:30:14 -0000       1.18
+++ epeg_main.c 18 Jul 2006 16:15:45 -0000      1.19
@@ -1153,7 +1153,7 @@
        im->error = 1;
        goto done;
      }
-   
+
    jpeg_create_compress(&(im->out.jinfo));
    if (im->out.f)
      jpeg_stdio_dest(&(im->out.jinfo), im->out.f);
@@ -1171,12 +1171,12 @@
        dst_mgr->buf = malloc(65536);
        im->out.jinfo.dest = (struct jpeg_destination_mgr *)dst_mgr;
      }
-   jpeg_set_defaults(&(im->out.jinfo));
    im->out.jinfo.image_width      = im->out.w;
    im->out.jinfo.image_height     = im->out.h;
    im->out.jinfo.input_components = im->in.jinfo.output_components;
    im->out.jinfo.in_color_space   = im->in.jinfo.out_color_space;
    im->out.jinfo.dct_method      = im->in.jinfo.dct_method;
+   jpeg_set_defaults(&(im->out.jinfo));
    jpeg_set_quality(&(im->out.jinfo), im->out.quality, TRUE);   
    
    if (im->out.quality >= 90)
@@ -1214,9 +1214,9 @@
    
    while (im->out.jinfo.next_scanline < im->out.h)
      jpeg_write_scanlines(&(im->out.jinfo), 
&(im->lines[im->out.jinfo.next_scanline]), 1);
+   jpeg_finish_compress(&(im->out.jinfo));
 
    done:
-   jpeg_finish_compress(&(im->out.jinfo));
    if ((im->in.f) || (im->in.mem.data != NULL)) 
jpeg_destroy_decompress(&(im->in.jinfo));
    if ((im->in.f) && (im->in.file))         fclose(im->in.f);
    if (dst_mgr)



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to