Using IM 6.8.0.2 x64 debug build on Win7, a simple file read & file write noticeably changes the shading of the following image:
Source file: http://cssignet.free.fr/png-test-corpus ... dbe-c0.png
I am using the Magick++ interface, but was also able to reproduce this same behavior with convert.exe
Convert.exe:
Code: Select all
convert "01-c3-shouldbe-c0.png" "01-c3-shouldbe-c0.converted.png"
Code: Select all
Image input;
input.read( "01-c3-shouldbe-c0.png" );
input.write( "01-c3-shouldbe-c0.imread.png" );
Update: Looping on a read/write causes the progressive degradation of the image. Here is some sample code which continually degrades the image, in visual display, color count, and file size. It gets worse with each iteration. Why?
Code: Select all
void png_degrade_test( const string& file_name )
{
Image img;
img.read( file_name );
for ( int i = 0; i < 5; i++ )
{
string ofname = file_name + "." + util::to_string( i ) + ".png";
img.write( ofname );
img.read( ofname );
}
}
Thanks