Fix for PNG height size limits
by Tom Spilman · in Torque Game Engine Advanced · 01/14/2007 (1:47 pm) · 2 replies
I posted the majority of this fix to the TGE forums over here.
In addition to this i fixed the special GBitmap::writePNGDebug() found in TSE.
At line 456 remove this:
Then add this at line 469...
Now remove all further references to FrameAllocator:: in the function. The FrameAllocatorMarker takes care of managing the watermark all by itself. FrameAllocatorMarker and FrameTemp<> rule. ;)
Enjoy!
In addition to this i fixed the special GBitmap::writePNGDebug() found in TSE.
At line 456 remove this:
// Check height
#define MAX_HEIGHT 4096
if (height >= MAX_HEIGHT)
return (false);Then add this at line 469...
// REMOVED: png_bytep row_pointers[MAX_HEIGHT];
FrameAllocatorMarker marker; // ADDED!
png_bytep* row_pointers = (png_bytep*)marker.alloc( height * sizeof( png_bytep ) ); // ADDED!
char bitmapNameBuf[256];
for(U32 i = 0; i < getNumMipLevels(); i++ )
{Now remove all further references to FrameAllocator:: in the function. The FrameAllocatorMarker takes care of managing the watermark all by itself. FrameAllocatorMarker and FrameTemp<> rule. ;)
Enjoy!
About the author
Tom is a programmer and co-owner of Sickhead Games, LLC.
Torque Owner Thomas \"Man of Ice\" Lund
One of those nasty irritating issues that was damn annoying to everyone