blob: 6211610f2a5e27c4eb6adb06c02f31f902f11c2d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# This file is a Tcl script to test out GIF reading and writing.
# It is organized in the standard fashion for Tcl tests.
#
if {[string compare test [info procs test]] == 1} {
source defs
}
set gifdata \
{R0lGODlhEAAMAJEAANnZ2QAAAPD/gP///yH5BAEAAAAALAAAAAAQAAwAAAIghINhyycvVFsB
QtmS3rjaH1Hg141WaT5ouprt2HHcUgAAOw==}
test gif-1.1 {} {
catch {image delete i}
image create photo i -file folder.gif
} i
test gif-1.2 {} {
catch {image delete i}
image create photo i -data $gifdata
i data -format gif
} $gifdata
test gif-1.3 {} {
catch {image delete i}
image create photo i
i put $gifdata
i data -format gif
} $gifdata
test gif-1.4 {} {
i blank
i put $gifdata -format gif
i data -format gif
} $gifdata
test gif-2.0 {Binary I/O with GIF images} {
i blank
set f [open folder.gif r]
fconfigure $f -translation binary
set return [catch {i put [read $f]} msg]
close $f
lappend return $msg
} {0 {}}
|