Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/modules/savers/tiff Modified Files: evas_image_save_tiff.c Log Message: cedric's cache changes patch =================================================================== RCS file: /cvs/e/e17/libs/evas/src/modules/savers/tiff/evas_image_save_tiff.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- evas_image_save_tiff.c 28 Dec 2006 12:48:20 -0000 1.6 +++ evas_image_save_tiff.c 12 Apr 2008 00:32:30 -0000 1.7 @@ -22,11 +22,11 @@ int i = 0; int has_alpha; - if (!im || !im->image || !im->image->data || !file) + if (!im || !im->image.data || !file) return 0; has_alpha = im->flags & RGBA_IMAGE_HAS_ALPHA; - data = im->image->data; + data = im->image.data; tif = TIFFOpen(file, "w"); if (!tif) @@ -35,8 +35,8 @@ /* None of the TIFFSetFields are checked for errors, but since they */ /* shouldn't fail, this shouldn't be a problem */ - TIFFSetField(tif, TIFFTAG_IMAGELENGTH, im->image->h); - TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, im->image->w); + TIFFSetField(tif, TIFFTAG_IMAGELENGTH, im->cache_entry.h); + TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, im->cache_entry.w); TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); TIFFSetField(tif, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); @@ -67,12 +67,12 @@ return 0; } - for (y = 0; y < im->image->h; y++) + for (y = 0; y < im->cache_entry.h; y++) { i = 0; - for (x = 0; x < im->image->w; x++) + for (x = 0; x < im->cache_entry.w; x++) { - pixel = data[(y * im->image->w) + x]; + pixel = data[(y * im->cache_entry.w) + x]; r = (pixel >> 16) & 0xff; g = (pixel >> 8) & 0xff; ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs