@@ -93,18 +93,6 @@ Users are encouraged to contribute these definitions to the
93
93
` registry.jl ` file of this package, so that information about file
94
94
formats exists in a centralized location.
95
95
96
- Handling MIME outputs is similar, except that one also provides the
97
- type of the object to be written:
98
- ``` jl
99
- mimewritable (:: MIME"image/png" , img:: AbstractArray ) = ndims (img) == 2
100
- add_mime (MIME (" image/png" ), AbstractArray, :ImageMagick )
101
- ```
102
-
103
- In cases where the type is defined in Base julia, such declarations
104
- can by included in FileIO's ` registry ` file. In contrast, when the
105
- type is defined in a package, that package should call them. Note that
106
- ` add_mime ` should be called from the package's ` __init__ ` function.
107
-
108
96
## Implementing loaders/savers
109
97
110
98
In your package, write code like the following:
@@ -144,19 +132,6 @@ automatically even if the code inside the `do` scope throws an error.)
144
132
Conversely, ` load(::Stream) ` and ` save(::Stream) ` should not close the
145
133
input stream.
146
134
147
- For MIME output, you would implement a method like this:
148
- ``` jl
149
- function Base. writemime (s:: Stream{format"ImageMagick"} , :: MIME"image/png" , x)
150
- io = stream (s)
151
- # Do the stuff needed to create the output
152
- end
153
- ```
154
-
155
- It's perfectly acceptable to also create a `Base.writemime(s::IO,
156
- ::MIME"image/png", x)` method. Such methods will generally take
157
- precedence over FileIO's generic fallback ` writemime ` function, and
158
- therefore in some cases might improve performance.
159
-
160
135
## Help
161
136
162
137
You can get an API overview by typing ` ?FileIO ` at the REPL prompt.
0 commit comments