| Ticket UUID: | 32f2e19de82946d0277b72dcb840b4753d6e643e | |||
| Title: | Windows: photo -gamma and -palette are ignored since RGBA rendering | |||
| Type: | Bug | Version: | 9.1b1 | |
| Submitter: | serhiy.storchaka | Created on: | 2026-09-24 13:53:02 | |
| Subsystem: | 41. Photo Images | Assigned To: | aku | |
| Priority: | 5 Medium | Severity: | Minor | |
| Status: | Closed | Last Modified: | 2026-09-29 19:32:13 | |
| Resolution: | Fixed | Closed By: | oehhar | |
| Closed on: | 2026-09-29 19:32:13 | |||
| Description: |
Since [3bbe54bc74] (merge of [7caf9e9e])
foreach {img opts} {plain {} gamma {-gamma 2}} {
image create photo $img -width 60 -height 60 {*}$opts
$img put #ffa500 -to 0 0 60 60
pack [label .$img -image $img] -side left
}
In 8.6 and 9.0 the right image is lighter than the left one, (255,205,0) instead of (255,165,0); in 9.1b1 both are the same orange.
foreach {img opts} {plain {} gray2 {-palette 2} rgb3 {-palette 3/3/3}} {
image create photo $img -width 120 -height 120 {*}$opts
for {set x 0} {$x < 120} {incr x} {
$img put [format #%02x%02x00 [expr {$x * 255 / 119}] [expr {$x * 165 / 119}]] \
-to $x 0 [expr {$x + 1}] 120
}
pack [label .$img -image $img] -side left
}
In 8.6 and 9.0 the second and third images are dithered with 2 shades of gray and 3 levels per color; in 9.1b1 all three show the same smooth gradient. (The black and white dither of On X11 both options work as expected in 8.6, 9.0 and 9.1. macOS has always ignored them ([de6ef8276c]). | |||
| User Comments: |
oehhar added on 2026-09-29 19:32:13:
Thanks ! Fix is effective. Merged to main by [05a0704a]. Mason, could you comment on this fix? Bug closed. Thanks for all, Harald serhiy.storchaka added on 2026-09-24 19:20:11:
Correction: this can be tested. serhiy.storchaka added on 2026-09-24 13:55:27:
Fixed in branch win-photo-gamma-palette ([c892f77266]). When the instance has a non-default Images with partially transparent pixels are still drawn from the model's RGBA data, so these options still have no effect on them, as on macOS. There is no automatic test: Tk cannot read pixels back from the screen, so the examples above have to be checked visually. | |||
Home
Timeline
Branches
Tags
Forum
Tickets
Download
Wiki