Tk Source Code

View Ticket
Login
Ticket UUID: 06c3fcb13660d9e680c6045d3a456080fa40ae42
Title: png write problem
Type: Bug Version: 8.6.2 and 8.6.3
Submitter: anonymous Created on: 2014-12-08 19:41:31
Subsystem: 41. Photo Images Assigned To: dgp
Priority: 7 High Severity: Important
Status: Closed Last Modified: 2015-05-05 19:40:52
Resolution: Fixed Closed By: dgp
    Closed on: 2015-05-05 19:40:52
Description:
Seems like writing an image to png has some occasional corruption issues.I have a PPM image here :

   http://eer.cmc.ec.gc.ca/tmp/tk_png_corruption/

and if you read it in tk and save it back to PNG, you'll get a corrupted image.

   image create photo TTT -file test_notcorrupt.ppm
   TTT write test_corrupt.png -format png
User Comments: dgp added on 2015-05-05 19:40:52:
The earlier bugfix had a small error in placing some code,
so that some callers never got the message that the alpha
channel was fully opaque. 

This interacted with a different bug in the PNG writer itself.

Both fixed now on the Tk trunk.

dgp added on 2015-05-04 17:31:07:

This is related to an earlier ticket

http://core.tcl.tk/tk/info/3603436

in that this demo fails in one way before that
bug as fixed (produces an image with components
all mixed up) and in a different way after (produces
a file that cannot be read in as a valid image at all.
You get the error "invalid filter type 255" instead).