|
1 | 1 | function FileIO.save(file::File{format"PNG"}, data)
|
2 | 2 | if mimewritable("image/png", data)
|
3 | 3 | open(file.filename, "w") do s
|
4 |
| - show(s, "image/png", data) |
| 4 | + show(IOContext(s, :full_fidelity=>true), "image/png", data) |
5 | 5 | end
|
6 | 6 | else
|
7 | 7 | throw(ArgumentError("Argument does not support conversion to png."))
|
|
11 | 11 | function FileIO.save(file::File{format"SVG"}, data)
|
12 | 12 | if mimewritable("image/svg+xml", data)
|
13 | 13 | open(file.filename, "w") do s
|
14 |
| - show(s, "image/svg+xml", data) |
| 14 | + show(IOContext(s, :full_fidelity=>true), "image/svg+xml", data) |
15 | 15 | end
|
16 | 16 | else
|
17 | 17 | throw(ArgumentError("Argument does not support conversion to svg."))
|
|
21 | 21 | function FileIO.save(file::File{format"PDF"}, data)
|
22 | 22 | if mimewritable("application/pdf", data)
|
23 | 23 | open(file.filename, "w") do s
|
24 |
| - show(s, "application/pdf", data) |
| 24 | + show(IOContext(s, :full_fidelity=>true), "application/pdf", data) |
25 | 25 | end
|
26 | 26 | else
|
27 | 27 | throw(ArgumentError("Argument does not support conversion to pdf."))
|
|
31 | 31 | function FileIO.save(file::File{format"EPS"}, data)
|
32 | 32 | if mimewritable("application/eps", data)
|
33 | 33 | open(file.filename, "w") do s
|
34 |
| - show(s, "application/eps", data) |
| 34 | + show(IOContext(s, :full_fidelity=>true), "application/eps", data) |
35 | 35 | end
|
36 | 36 | else
|
37 | 37 | throw(ArgumentError("Argument does not support conversion to eps."))
|
|
0 commit comments