Tk Library Source Code

View Ticket
Login
Ticket UUID: e7f1ed859e9ba6b2317af2736634e935a91ecf1c
Title: The ICO package does not handle 256x256 icons properly
Type: Bug Version: 0.7
Submitter: drlabelle Created on: 2020-09-12 23:44:15
Subsystem: tklib :: ico Assigned To: nobody
Priority: 5 Medium Severity: Important
Status: Open Last Modified: 2020-09-12 23:44:15
Resolution: None Closed By: nobody
    Closed on:
Description:
The ::ico::getIconMembersICO procedure returns a value of 0 for both the width and height of 256x256 icons. Zero is the stored value for this size icon but the value should be interpreted to mean a value of 256.

The procedure can be corrected by replacing the following line in the ::ico::getIconMembersICO procedure
	    lappend info [scan [read $fh 1] %c] [scan [read $fh 1] %c]
with
	    set width [scan [read $fh 1] %c]
	    set height [scan [read $fh 1] %c]
	    if {$width == 0} { set width 256}
	    if {$height == 0} { set height 256 }
	    lappend info $width $height