Skip to content

Commit 24d5ac2

Browse files
authored
Merge pull request #381 from rakeshksr/opencv
Add support for OpenCV.jl
2 parents 05ebb3f + 0133319 commit 24d5ac2

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/registry.jl

+8-4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const idImageIO = :ImageIO => UUID("82e4d734-157c-48bb-816b-45c225c6df19")
77
const idImageMagick = :ImageMagick => UUID("6218d12a-5da1-5696-b52f-db25d2ecc6d1")
88
const idMeshIO = :MeshIO => UUID("7269a6da-0436-5bbc-96c2-40638cbb6118")
99
const idNetpbm = :Netpbm => UUID("f09324ee-3d7c-5217-9330-fc30815ba969")
10+
const idOpenCV = :OpenCV => UUID("f878e3a2-a245-4720-8660-60795d644f2a")
1011
const idQuartzImageIO = :QuartzImageIO => UUID("dca85d43-d64c-5e67-8c65-017450d5d020")
1112
const idRData = :RData => UUID("df47a6cb-8c03-5eed-afd8-b6050d6c41da")
1213
const idStatFiles = :StatFiles => UUID("1463e38c-9381-5320-bcd4-4134955f093a")
@@ -149,7 +150,7 @@ add_format(format"EXR", UInt8[0x76,0x2f,0x31,0x01], ".exr",
149150
add_format(format"HDR", UInt8[0x23,0x3f,0x52,0x41,0x44,0x49,0x41,0x4e], ".hdr", [idImageMagick])
150151
add_format(format"ICO", UInt8[0x00,0x00,0x01,0x00], ".ico", [idImageMagick])
151152
add_format(format"INFO", UInt8[0x7a,0x62,0x65,0x78], ".info",[idImageMagick])
152-
add_format(format"JP2", UInt8[0x00,0x00,0x00,0x0c,0x6a,0x50,0x20,0x20], ".jp2", [idImageMagick])
153+
add_format(format"JP2", UInt8[0x00,0x00,0x00,0x0c,0x6a,0x50,0x20,0x20], ".jp2", [idImageMagick], [idOpenCV])
153154
add_format(format"PDB", UInt8[0x73,0x7a,0x65,0x7a], ".pdb", [idImageMagick])
154155
add_format(format"PDF", UInt8[0x25,0x50,0x44,0x46], ".pdf", [idImageMagick], [MimeWriter, SAVE])
155156
add_format(format"PGM", UInt8[0x50,0x35,0x0a], ".pgm", [idImageMagick])
@@ -180,6 +181,7 @@ add_format(
180181
[idImageIO],
181182
[idQuartzImageIO, OSX],
182183
[idImageMagick],
184+
[idOpenCV],
183185
[MimeWriter, SAVE]
184186
)
185187
add_format(
@@ -189,14 +191,16 @@ add_format(
189191
[idJpegTurbo],
190192
[idImageIO],
191193
[idQuartzImageIO, OSX],
192-
[idImageMagick]
194+
[idImageMagick],
195+
[idOpenCV]
193196
) # 0xe1
194197
add_format(
195198
format"BMP",
196199
UInt8[0x42,0x4d],
197200
".bmp",
198201
[idQuartzImageIO, OSX],
199-
[idImageMagick]
202+
[idImageMagick],
203+
[idOpenCV]
200204
)
201205
add_format(
202206
format"PCX",
@@ -385,7 +389,7 @@ function detecttiff(io)
385389
end
386390
# normal TIFF
387391
detect_noometiff(io) = detecttiff(io) && ((:name propertynames(io)) || !(endswith(io.name, ".ome.tif>") || endswith(io.name, ".ome.tiff>")))
388-
add_format(format"TIFF", detect_noometiff, [".tiff", ".tif"], [idImageIO], [idQuartzImageIO, OSX], [idImageMagick])
392+
add_format(format"TIFF", detect_noometiff, [".tiff", ".tif"], [idImageIO], [idQuartzImageIO, OSX], [idImageMagick], [idOpenCV])
389393
# OME-TIFF
390394
detect_ometiff(io) = detecttiff(io) && (:name propertynames(io)) && (endswith(io.name, ".ome.tif>") || endswith(io.name, ".ome.tiff>"))
391395
add_format(format"OMETIFF", detect_ometiff, [".tif", ".tiff"], [:OMETIFF => UUID("2d0ec36b-e807-5756-994b-45af29551fcf")])

0 commit comments

Comments
 (0)