blob: d7c4d091436864e4db7413a39b5348992b9406eb (
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
|
# This file is a Tcl script to test out TIFF reading and writing.
# It is organized in the standard fashion for Tcl tests.
#
if {[string compare test [info procs test]] == 1} {
source defs
}
set tiffdata \
{TU0AKgAAAkgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAADw/4Dw/4Dw/4Dw/4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AADw/4Dw/4Dw/4Dw/4Dw/4Dw/4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADw/4Dw/4Dw/4Dw/4Dw
/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4AAAAAAAAAAAAAAAAAAAADw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw
/4Dw/4Dw/4Dw/4Dw/4AAAAAAAAAAAAAAAAAAAADw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw
/4Dw/4Dw/4AAAAAAAAAAAAAAAAAAAADw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw
/4AAAAAAAAAAAAAAAAAAAADw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4AAAAAA
AAAAAAAAAAAAAADw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4AAAAAAAAAAAAAA
AAAAAADw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4Dw/4AAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgEAAAMAAAAB
ABAAAAEBAAMAAAABAAwAAAECAAMAAAADAAAC9gEDAAMAAAABAAEAAAEGAAMAAAABAAIAAAER
AAQAAAABAAAACAESAAMAAAABAAEAAAEVAAMAAAABAAMAAAEWAAMAAAABAAwAAAEXAAQAAAAB
AAACQAEaAAUAAAABAAAC/AEbAAUAAAABAAADBAEcAAMAAAABAAEAAAEoAAMAAAABAAIAAAAA
AAAACAAIAAgSwAAAAAQAABLAAAAABAAA}
test tiff-1.1 {} {
catch {image delete i}
image create photo i -file folder.tif
} i
test tiff-1.2 {} {
catch {image delete i}
image create photo i
i put $tiffdata
i data -format {tiff -byteorder bigendian}
} $tiffdata
test tiff-1.3 {} {
i blank
i put $tiffdata -format tiff
i data -format {tiff -byteorder bigendian}
} $tiffdata
if {[info tclversion] < 8.0} {
return
}
test tiff-2.0 {Binary I/O with TIFF images} {
i blank
set f [open folder.tif r]
fconfigure $f -translation binary
set return [catch {i put [read $f]} msg]
close $f
lappend return $msg
} {0 {}}
|