diff options
author | fvogel <fvogelnew1@free.fr> | 2024-06-09 18:51:00 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2024-06-09 18:51:00 (GMT) |
commit | f59389521788b120e5293872c26ececc0724b294 (patch) | |
tree | e71edd927008dcad1d84b0a48cc41c2b685a3f81 | |
parent | 2e885d3219e939c63c04be3594ef1070ad1eb7b5 (diff) | |
download | tk-f59389521788b120e5293872c26ececc0724b294.zip tk-f59389521788b120e5293872c26ececc0724b294.tar.gz tk-f59389521788b120e5293872c26ececc0724b294.tar.bz2 |
Add more tests for GIF and PNG images: read large region from small file.
-rw-r--r-- | tests/imgPhoto.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test index 741a4c0..62b0587 100644 --- a/tests/imgPhoto.test +++ b/tests/imgPhoto.test @@ -1410,6 +1410,14 @@ test imgPhoto-19.5 {Read GIF file with -from, -to and -shrink options} -body { } -cleanup { catch {image delete gif1} } -result {{#d8c8b8} 113 155} +test imgPhoto-19.6 {Read GIF file with -from option, read large region from small file} -body { + set earthPhotoFile [file join [file dirname [info script]] earth.gif] + image create photo gif1 + catch {gif1 read $earthPhotoFile -from 152 62 2000 1000} msg + list $msg [image width gif1] [image height gif1] +} -cleanup { + catch {image delete gif1} +} -result {{coordinates for -from option extend outside source image} 0 0} unset earthPhotoFile set ousterPhotoFile [file join [file dirname [info script]] ouster.png] @@ -1449,6 +1457,13 @@ test imgPhoto-20.5 {Read PNG file with -from, -to and -shrink options} -body { } -cleanup { catch {image delete png1} } -result {{#c97962} 113 155} +test imgPhoto-20.6 {Read PNG file with -from option, read large region from small file} -body { + image create photo png1 + catch {png1 read $ousterPhotoFile -from 102 62 2000 1000} msg + list $msg [image width png1] [image height png1] +} -cleanup { + catch {image delete png1} +} -result {{coordinates for -from option extend outside source image} 0 0} unset ousterPhotoFile catch {rename foreachPixel {}} |