blob: b30b370f99da00d0a87cc36adbc0a47497f8c8c4 (
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# This file is a Tcl script to test out SGI reading and writing.
# It is organized in the standard fashion for Tcl tests.
#
puts "img::sgi [package require img::sgi]"
set sgidata \
{AdoBAQADABAADAAEAAAAAAAAAP8AAAAAbm8gbmFtZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATBAAAEowAABIUAAARnAAAESQAABCsAAAQN
AAAD7wAAA90AAAO8AAADmAAAA4AAAATGAAAErAAABI4AAARwAAAEUgAABDQAAAQWAAAD+AAA
A+IAAAPGAAADowAAA4cAAATLAAAEtQAABJcAAAR5AAAEWwAABD0AAAQfAAAEAQAAA+cAAAPQ
AAADrgAAA44AAATQAAAEvgAABKAAAASCAAAEZAAABEYAAAQoAAAECgAAA+wAAAPaAAADuQAA
A5UAAAAFAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAUAAAAKAAAACwAAAAcAAAAF
AAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAUAAAAKAAAACwAAAAcAAAAFAAAACQAA
AAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAUAAAAKAAAACwAAAAcAAAADAAAAAwAAAAMAAAAD
AAAAAwAAAAMAAAADAAAAAwAAAAMAAAADAAAAAwAAAAMD2QQACdkAA9kEAAnZAAPZBAAJ2QAQ
/wCD2dkABPCBAAjZAIPZ2QAE/4EACNkAg9nZAASAgQAI2QAQ/wCC2QAG8IEAB9kAgtkABv+B
AAfZAILZAAaAgQAH2QAQ/wANAAPZAA0AA9kADQAD2QAQ/wCBAAvwgQAD2QCBAAv/gQAD2QCB
AAuAgQAD2QAQ/wCBAAvwgQAD2QCBAAv/gQAD2QCBAAuAgQAD2QAQ/wCBAAvwgQAD2QCBAAv/
gQAD2QCBAAuAgQAD2QAQ/wCBAAvwgQAD2QCBAAv/gQAD2QCBAAuAgQAD2QAQ/wCBAAvwgQAD
2QCBAAv/gQAD2QCBAAuAgQAD2QAQ/wCBAAvwgQAD2QCBAAv/gQAD2QCBAAuAgQAD2QAQ/wCB
AAvwgQAD2QCBAAv/gQAD2QCBAAuAgQAD2QAQ/wANAAPZAA0AA9kADQAD2QAQ/wA=}
test sgi-1.1 {} {
catch {image delete i}
image create photo i -file [file join $tcltest::testsDirectory folder.rgb]
i data -format sgi
} $sgidata
test sgi-1.2 {} {
catch {image delete i}
image create photo i -data $sgidata
set data [i data -format sgi]
} $sgidata
test sgi-1.3 {} {
i blank
i put $data
set data [i data -format sgi]
} $sgidata
test sgi-1.4 {} {
i blank
i put $data -format sgi
set data [i data -format sgi]
} $sgidata
if {[info tclversion] < 8.0} {
return
}
test sgi-2.0 {Binary I/O with SGI images} {
i blank
set f [open [file join $tcltest::testsDirectory folder.rgb] r]
fconfigure $f -translation binary
set return [catch {i put [read $f]} msg]
close $f
lappend return $msg
} {0 {}}
|