[Gridflow-cvs] [svn] commit: r5058 - /trunk/src/gem.cxx

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Thu Feb 25 00:39:36 EST 2010


Author: matju
Date: Thu Feb 25 00:39:36 2010
New Revision: 5058

Log:
support imageStruct::upsidedown (because of OSX [pix_image] or whatever)

Modified:
    trunk/src/gem.cxx

Modified: trunk/src/gem.cxx
==============================================================================
--- trunk/src/gem.cxx (original)
+++ trunk/src/gem.cxx Thu Feb 25 00:39:36 2010
@@ -158,8 +158,9 @@
 	long sy = in->dim->v[0];
 	BitPacking *bp = in->dim->get(2)==3 ? bit_packing3 : bit_packing4;
 	imageStruct &im = m_pixBlock.image;
-	if (yflip) {for (long y=     dex/sxc; n; data+=sxc, n-=sxc, y++) bp->pack(sx,data,buf+y*sx*im.csize);}
-        else       {for (long y=sy-1-dex/sxc; n; data+=sxc, n-=sxc, y--) bp->pack(sx,data,buf+y*sx*im.csize);}
+	bool f = yflip^im.upsidedown;
+	if (f) {for (long y=     dex/sxc; n; data+=sxc, n-=sxc, y++) bp->pack(sx,data,buf+y*sx*im.csize);}
+        else   {for (long y=sy-1-dex/sxc; n; data+=sxc, n-=sxc, y--) bp->pack(sx,data,buf+y*sx*im.csize);}
 } GRID_END
 \end class {install("#to_pix",2,1); add_creator("#export_pix");}
 



More information about the Gridflow-cvs mailing list