Artifact
070da56eb37765b5d1b1a3393965c7a747c8805e517ca31b9696622d591dc13f:
Attachment "imgcreatebug.tcl" to
ticket [f96c6eb3]
added by
obermeier
2024-06-10 20:10:56.
package require Tk
# Creating image 004987 (total 005001)...
# Fail to create pixmap with Tk_GetPixmap in TkImgPhotoInstanceSetSize
# If setting optShow to zero or optDelete to 1, the script works.
set optShow 1
set optDelete 0
label .l
pack .l
set delInd 1
for { set count 1 } { $count <= 10000 } { incr count } {
puts [format "Creating image %06d (total %06d)..." $count [llength [image names]]]
if { $optDelete } {
if { $count > 4000 } {
image delete $phImgs($delInd)
incr delInd
}
}
set phImgs($count) [image create photo -width 100 -height 100]
if { $optShow } {
.l configure -image $phImgs($count)
}
}
exit