Skip to content

Commit c3ff161

Browse files
committed
Merge pull request #36 from JuliaIO/teh/imagine
Register the Imagine format
2 parents 7be656f + b867d07 commit c3ff161

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

src/registry.jl

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -32,47 +32,48 @@ add_format(format"PSD", UInt8[0x38,0x42,0x50,0x53], ".psd",
3232
add_format(format"RGB", UInt8[0x01,0xda,0x01,0x01,0x00,0x03], ".rgb", [:ImageMagick])
3333
add_format(format"WMF", UInt8[0xd7,0xcd,0xc6,0x9a], ".wmf", [:ImageMagick])
3434
add_format(format"WPG", UInt8[0xff,0x57,0x50,0x43], ".wpg", [:ImageMagick])
35+
add_format(format"Imagine", "IMAGINE", ".imagine", [:ImagineFormat])
3536

3637
add_format(
37-
format"TGA",
38+
format"TGA",
3839
(),
39-
".tga",
40-
[:OSXNativeIO, LOAD, OSX],
40+
".tga",
41+
[:OSXNativeIO, LOAD, OSX],
4142
[:ImageMagick]
4243
)
4344
add_format(
44-
format"GIF",
45+
format"GIF",
4546
UInt8[0x47,0x49,0x46,0x38],
46-
".gif",
47-
[:OSXNativeIO, LOAD, OSX],
47+
".gif",
48+
[:OSXNativeIO, LOAD, OSX],
4849
[:ImageMagick]
4950
)
5051
add_format(
51-
format"PNG",
52-
UInt8[0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a],
53-
".png",
54-
[:OSXNativeIO, LOAD, OSX],
52+
format"PNG",
53+
UInt8[0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a],
54+
".png",
55+
[:OSXNativeIO, LOAD, OSX],
5556
[:ImageMagick]
5657
)
5758
add_format(
58-
format"TIFF",
59-
(UInt8[0x4d,0x4d,0x00,0x2a], UInt8[0x4d,0x4d,0x00,0x2b], UInt8[0x49,0x49,0x2a,0x00]),
60-
[".tiff", ".tif"],
61-
[:OSXNativeIO, LOAD, OSX],
59+
format"TIFF",
60+
(UInt8[0x4d,0x4d,0x00,0x2a], UInt8[0x4d,0x4d,0x00,0x2b], UInt8[0x49,0x49,0x2a,0x00]),
61+
[".tiff", ".tif"],
62+
[:OSXNativeIO, LOAD, OSX],
6263
[:ImageMagick]
6364
)
6465
add_format(
65-
format"JPEG",
66+
format"JPEG",
6667
UInt8[0xff,0xd8,0xff],
67-
[".jpeg", ".jpg", ".JPG"],
68-
[:OSXNativeIO, LOAD, OSX],
68+
[".jpeg", ".jpg", ".JPG"],
69+
[:OSXNativeIO, LOAD, OSX],
6970
[:ImageMagick]
7071
) # 0xe1
7172
add_format(
72-
format"BMP",
73+
format"BMP",
7374
UInt8[0x42,0x4d],
7475
".bmp",
75-
[:OSXNativeIO, LOAD, OSX],
76+
[:OSXNativeIO, LOAD, OSX],
7677
[:ImageMagick]
7778
)
7879

@@ -146,7 +147,7 @@ function detect_stlbinary(io)
146147
len = position(io)
147148
seekstart(io)
148149
len < size_header && return false
149-
150+
150151
skip(io, 80) # skip header
151152
number_of_triangle_blocks = read(io, UInt32)
152153
#1 normal, 3 vertices in Float32 + attrib count, usually 0
@@ -160,4 +161,3 @@ function detect_stlbinary(io)
160161
end
161162
add_format(format"STL_ASCII", detect_stlascii, [".stl", ".STL"], [:MeshIO])
162163
add_format(format"STL_BINARY", detect_stlbinary, [".stl", ".STL"], [:MeshIO])
163-

0 commit comments

Comments
 (0)