Skip to content

Commit 45711c9

Browse files
authored
Merge pull request #128 from davidanthoff/remove-mime
Remove remaining traces of MIME support
2 parents 820ec02 + a504896 commit 45711c9

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

README.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -93,18 +93,6 @@ Users are encouraged to contribute these definitions to the
9393
`registry.jl` file of this package, so that information about file
9494
formats exists in a centralized location.
9595

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-
10896
## Implementing loaders/savers
10997

11098
In your package, write code like the following:
@@ -144,19 +132,6 @@ automatically even if the code inside the `do` scope throws an error.)
144132
Conversely, `load(::Stream)` and `save(::Stream)` should not close the
145133
input stream.
146134

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-
160135
## Help
161136

162137
You can get an API overview by typing `?FileIO` at the REPL prompt.

src/FileIO.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export DataFormat,
1212
add_format,
1313
del_format,
1414
add_loader,
15-
add_mime,
1615
add_saver,
1716
filename,
1817
file_extension,

0 commit comments

Comments
 (0)