Tk Source Code

View Ticket
Login
Ticket UUID: 6b3644a4858f018cd08615d3d516b07d271fe2a
Title: The image -alpha option doesn't work on 16-bit/color PNG images.
Type: Bug Version: 8.6.6
Submitter: sbron Created on: 2017-02-23 16:30:48
Subsystem: 41. Photo Images Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2017-03-03 22:22:13
Resolution: Fixed Closed By: jima
    Closed on: 2017-03-03 22:22:13
Description:
When using an alpha value other than 1.0 for certain PNG images, the image comes out blank. Example:

image create photo img -file /usr/share/icons/oxygen/22x22/status/user-away.png -format {png -alpha 0.999999}
grid [label .l -image img]

I've seen this on a couple of different images. The linux file command reports these files as: PNG image data, 22 x 22, 16-bit/color RGBA, non-interlaced. The same command works correctly for files that are reported by `file` as: PNG image data, 22 x 22, 8-bit/color RGBA, non-interlaced.
User Comments: jima added on 2017-03-03 22:22:13:
Solution spotted by Tcl chat user TheLemonMan.

I have commited the patch on his behalf on:

  *  trunk [e0f243b4]
  *  core-8-6-branch [484c16f6]

The latter by using cherrypick from trunk and then creating the corresponding merge mark [08efcdf7]).

I have tested on my local environment that the patch fixes the reported issue.

To the best of my knowledge this fix does not introduce new problems on the test suite.

jima

Attachments: