Overview
Artifact ID: | 97f025c152122dca279cd7dd09b9ae952d0ca97a |
---|---|
Ticket: | 10f2e7872bc0f8d81fa0f3596afeb0f4cf1191a1
PNg writer produces invalid files |
User & Date: | fpigorsch 2016-10-17 14:28:52 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/html"
- comment changed to:
Starting in Tk 8.6.5, the following code snippet produces an invalid PNG file: <pre> ######## # create image (large dimensions seem to trigger the bug) set width 2000 set height 5000 set img [image create photo -width $width -height $height] # create row of random RGB pixels (a high number of different colors seems to be requirement for the bug) set row {} for {set x 0} {$x < $width} {incr x} { set c [format "#%02X%02X%02X" [expr int(rand() * 256)] [expr int(rand() * 256)] [expr int(rand() * 256)]] lappend row $c } set row [list $row] # fill image with 'row' for {set y 0} {$y < $height} {incr y} { $img put $row -to 0 $y $width [expr {$y + 1}] } # write png set fname /tmp/invalid.png $img write -format png $fname exit ######## </pre> Loading /tmp/invalid.png with a libpng-based app (e.g. pngtopnm), results in several error messages, such as <pre> ... libpng warning: Ignoring bad adaptive filter type libpng warning: Ignoring bad adaptive filter type pnmtopng: fatal libpng error: Extra compressed data pngtopnm: setjmp returns error condition </pre>
- foundin changed to: "8.6.6, 8.6.5"
- is_private changed to: "0"
- login: "fpigorsch"
- priority changed to: "5 Medium"
- private_contact changed to: "ecd5642cbe51a82be8aa1993eeaafe0441ea8139"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "fpigorsch"
- subsystem changed to: "41. Photo Images"
- title changed to: "PNg writer produces invalid files"
- type changed to: "Bug"