diff options
author | fvogel <fvogelnew1@free.fr> | 2024-06-09 16:44:10 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2024-06-09 16:44:10 (GMT) |
commit | 25eb1dc787868840925c52258f560534f860d435 (patch) | |
tree | 838b2349ff8e20e4835cb3a2a2855778d1f97c76 /tests | |
parent | 349a69f9287ebf1e15f32de11cca27f67713ade7 (diff) | |
download | tk-25eb1dc787868840925c52258f560534f860d435.zip tk-25eb1dc787868840925c52258f560534f860d435.tar.gz tk-25eb1dc787868840925c52258f560534f860d435.tar.bz2 |
Fix width and height of the image read (PNG case only, GIF was already OK).
Diffstat (limited to 'tests')
-rw-r--r-- | tests/imgPhoto.test | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test index f6ed988..43f487f 100644 --- a/tests/imgPhoto.test +++ b/tests/imgPhoto.test @@ -1429,40 +1429,40 @@ test imgPhoto-19.1 {Read GIF file with -from option - Bug [1576528]} -body { set earthPhotoFile [file join [file dirname [info script]] earth.gif] image create photo gif1 gif1 read $earthPhotoFile -from 152 62 185 97 - lindex [lindex [gif1 data] 0] 0 + list [lindex [lindex [gif1 data] 0] 0] [image width gif1] [image height gif1] } -cleanup { catch {image delete gif1} unset earthPhotoFile -} -result {#d8c8b8} +} -result {{#d8c8b8} 33 35} test imgPhoto-19.2 {Read GIF file, copy with -from option} -body { set earthPhotoFile [file join [file dirname [info script]] earth.gif] image create photo gif1 -file $earthPhotoFile image create photo gif2 gif2 copy gif1 -from 152 62 185 97 - lindex [lindex [gif2 data] 0] 0 + list [lindex [lindex [gif2 data] 0] 0] [image width gif2] [image height gif2] } -cleanup { catch {image delete gif1 ; image delete gif2} unset earthPhotoFile -} -result {#d8c8b8} +} -result {{#d8c8b8} 33 35} test imgPhoto-19.3 {Read PNG file with -from option - Bug [1576528]} -body { set ousterPhotoFile [file join [file dirname [info script]] ouster.png] image create photo png1 png1 read $ousterPhotoFile -from 102 62 135 97 - lindex [lindex [png1 data] 0] 0 + list [lindex [lindex [png1 data] 0] 0] [image width png1] [image height png1] } -cleanup { catch {image delete png1} unset ousterPhotoFile -} -result {#c97962} +} -result {{#c97962} 33 35} test imgPhoto-19.4 {Read PNG file, copy with -from option} -body { set ousterPhotoFile [file join [file dirname [info script]] ouster.png] image create photo png1 -file $ousterPhotoFile image create photo png2 png2 copy png1 -from 102 62 135 97 - lindex [lindex [png2 data] 0] 0 + list [lindex [lindex [png2 data] 0] 0] [image width png2] [image height png2] } -cleanup { catch {image delete png1 ; image delete png2} unset ousterPhotoFile -} -result {#c97962} +} -result {{#c97962} 33 35} catch {rename foreachPixel {}} catch {rename checkImgTrans {}} |