This program crashes my machine (winxp with MSVC++ 7.10) when using
burro.png. I notice the memory build up and up and then it dies. I has only
happened since I began experimenting with readfromfile. Have I done
something wrong or is there a problem here?

// xbnbt_test_png.cpp 
//

#include <pngwriter.h>

void test ()
{
        pngwriter image( 1, 1, 0.0, "out.png" );
        image.setcompressionlevel( 0 );
        char cName[255];
        
        for( int i = 0; i != 1000; i++ )
        {
                sprintf( cName, "%d.png", i );

                std::cout << "Writing: " << cName;

                image.pngwriter_rename( cName );

                image.readfromfile( "burro.png" );

                image.plot_text_utf8( "arial.ttf", 14 ,4 ,4, 0.0, cName,
0.0, 0.0, 0.0 );

                image.write_png();
                        
                std::cout << "        Done.\n";
        }
        image.close( );
}
                        
int main()
{
        test();

        system("PAUSE");
}

For some reason it crashes at image 508.

Permissions are fine.

Not sure how to send a backtrace but I will find out.




-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
_______________________________________________
http://pngwriter.sourceforge.net/
PNGwriter-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/pngwriter-users

Reply via email to