Skip to content

Commit 71d6457

Browse files
committed
Update README.md
1 parent 046a170 commit 71d6457

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

README.md

+19-6
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,28 @@
55

66
Saving and loading of OpenEXR files.
77

8-
Basic usage:
8+
# Load an EXR file
9+
910
```jl
1011
using OpenEXR
1112

12-
# read an EXR file into an `Array{RGBA{Float16},2}`.
13-
myimage = OpenEXR.load(File{DataFormat{:EXR}}("myimage.exr"))
13+
myimage = OpenEXR.load("myimage.exr")
14+
```
15+
16+
`myimage` has type `Array{T,2}` where `T` is one of:
17+
18+
- RGBA{Float16}
19+
- RGB{Float16}
20+
- GrayA{Float16}
21+
- Gray{Float16}
1422

15-
# save an image to an EXR file
16-
OpenEXR.save(File{DataFormat{:EXR}}("myimage2.exr"), myimage)
23+
depending on which channels are present in the file.
24+
25+
# Save an image as an EXR file
26+
27+
```jl
28+
OpenEXR.save("myimage2.exr", myimage)
1729
```
1830

19-
TODO: get this registered with [FileIO](https://github.com/JuliaIO/FileIO.jl).
31+
`myimage` can be any subtype of `AbstractArray{C,2}` where `C` is any color type defined in
32+
[ColorTypes.jl](https://github.com/JuliaGraphics/ColorTypes.jl).

0 commit comments

Comments
 (0)