[opengtl-commits] [356] swap bit order |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/opengtl-commits Archives
]
Revision: 356
Author: cyrille
Date: 2008-09-03 22:53:32 +0200 (Wed, 03 Sep 2008)
Log Message:
-----------
swap bit order
Modified Paths:
--------------
trunk/OpenGTL/Extensions/PngDC/PngDC.cpp
Modified: trunk/OpenGTL/Extensions/PngDC/PngDC.cpp
===================================================================
--- trunk/OpenGTL/Extensions/PngDC/PngDC.cpp 2008-09-03 19:16:59 UTC (rev 355)
+++ trunk/OpenGTL/Extensions/PngDC/PngDC.cpp 2008-09-03 20:53:32 UTC (rev 356)
@@ -231,6 +231,9 @@
png_init_io(png_ptr, fp );
png_write_info(png_ptr, info_ptr);
+ if (bit_depth > 8)
+ png_set_swap(png_ptr);
+
int pixel_size = (_image->pixelDescription().bitsSize() / 8);
png_bytep row_pointer = new png_byte[ pixel_size * _region.width() ];