@@ -44,8 +44,10 @@ add_saver
44
44
- `load(filename)` loads the contents of a formatted file, trying to infer
45
45
the format from `filename` and/or magic bytes in the file.
46
46
- `load(strm)` loads from an `IOStream` or similar object. In this case,
47
- the magic bytes are essential.
48
- - `load(File(format"PNG",filename))` specifies the format directly, and bypasses inference.
47
+ there is no filename extension, so we rely on the magic bytes for format
48
+ identification.
49
+ - `load(File(format"PNG", filename))` specifies the format directly, and bypasses inference.
50
+ - `load(Stream(format"PNG", io))` specifies the format directly, and bypasses inference.
49
51
- `load(f; options...)` passes keyword arguments on to the loader.
50
52
"""
51
53
load
@@ -60,17 +62,22 @@ video or audio.
60
62
the format from `filename` and/or magic bytes in the file. It returns a streaming
61
63
type that can be read from in chunks, rather than loading the whole contents all
62
64
at once
63
- - `loadstreaming(strm)` loads the stream from an `IOStream` or similar object. In this case,
64
- the magic bytes are essential.
65
- - `load(File(format"PNG",filename))` specifies the format directly, and bypasses inference.
66
- - `load(f; options...)` passes keyword arguments on to the loader.
65
+ - `loadstreaming(strm)` loads the stream from an `IOStream` or similar object.
66
+ In this case, there is no filename extension, so we rely on the magic bytes
67
+ for format identification.
68
+ - `loadstreaming(File(format"WAV",filename))` specifies the format directly, and
69
+ bypasses inference.
70
+ - `loadstreaming(Stream(format"WAV", io))` specifies the format directly, and
71
+ bypasses inference.
72
+ - `loadstreaming(f; options...)` passes keyword arguments on to the loader.
67
73
"""
68
74
loadstreaming
69
75
70
76
"""
71
77
- `save(filename, data...)` saves the contents of a formatted file,
72
78
trying to infer the format from `filename`.
73
79
- `save(Stream(format"PNG",io), data...)` specifies the format directly, and bypasses inference.
80
+ - `save(File(format"PNG",filename), data...)` specifies the format directly, and bypasses inference.
74
81
- `save(f, data...; options...)` passes keyword arguments on to the saver.
75
82
"""
76
83
save
@@ -82,7 +89,10 @@ accept formatted objects, like an image or chunk of video or audio.
82
89
83
90
- `savestreaming(filename, data...)` saves the contents of a formatted file,
84
91
trying to infer the format from `filename`.
85
- - `savestreaming(Stream(format"PNG",io), data...)` specifies the format directly, and bypasses inference.
92
+ - `savestreaming(File(format"WAV",filename))` specifies the format directly, and
93
+ bypasses inference.
94
+ - `savestreaming(Stream(format"WAV", io))` specifies the format directly, and
95
+ bypasses inference.
86
96
- `savestreaming(f, data...; options...)` passes keyword arguments on to the saver.
87
97
"""
88
98
savestreaming
0 commit comments