Tk Source Code

View Ticket
Login
Ticket UUID: 2984787
Title: PNG: Bug in generated png images files
Type: Bug Version: obsolete: 8.6b1.1
Submitter: dkf Created on: 2010-04-09 22:33:23
Subsystem: 41. Photo Images Assigned To: dkf
Priority: 7 High Severity:
Status: Closed Last Modified: 2010-04-12 15:43:54
Resolution: Fixed Closed By: dkf
    Closed on: 2010-04-12 08:43:54
Description:
The attached PNG was generated from a trivial photo image by:
   $img write x.png

It is apparently buggy; OSX's quick view in Finder.app can view it, but neither Preview.app nor Firefox like it. Other apps (used by a website, so identity unknown) also don't like it.
User Comments: dkf added on 2010-04-12 15:43:54:

allow_comments - 1

Was due to the wrong sort of flush on getting to the end of the image data in WriteIDAT, i.e., TCL_ZLIB_FLUSH instead of (the correct) TCL_ZLIB_FINALIZE.

dkf added on 2010-04-10 05:51:29:
Generation code in full:
  image create photo foo
  foo put black -to 0 0
  foo put black -to 1 1
  foo put red -to 2 2
  foo put black -to 3 3
  foo put black -to 4 4
  foo put black -to 4 0
  foo put black -to 3 1
  foo put black -to 1 3
  foo put black -to 0 4
  foo write x.png

dkf added on 2010-04-10 05:33:24:

File Added - 370063: x.png

Attachments: