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

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Thu Feb 25 01:53:04 EST 2010


Author: matju
Date: Thu Feb 25 01:53:04 2010
New Revision: 5061

Log:
[#to_pix]: use imageStruct::upsidedown

Modified:
    trunk/src/gem.cxx

Modified: trunk/src/gem.cxx
==============================================================================
--- trunk/src/gem.cxx (original)
+++ trunk/src/gem.cxx Thu Feb 25 01:53:04 2010
@@ -155,11 +155,10 @@
 	/*!@#$ it would be nice to skip the bitpacking when we can */
 	long sxc = in->dim->prod(1);
 	long sx = in->dim->v[1];
-	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);}
+	im.upsidedown = !yflip;
+	for (long y=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