Commit 27e0d83
committed
null image input & output
This I/O plugin for "null" images are a file "format" where output of a
null file does nothing at all (no I/O, not even any data copying), and
input of a null file just fills the result buffers with black pixels (0
values), with no I/O or data copying.
What's this good for?
* Benchmarking, if you want to have OIIO's input or output truly take
as close to no time whatsoever.
* "Dry run" of applications where you don't want it to produce any real
output (akin to a Unix command that you redirect output to /dev/null).
* Make "fake" input that looks like a file, but the file doesn't exist
(if you are happy with constant-colored pixels).
The filename allows a REST-ful syntax, where you can append little doodads
that specify things like resolution (of the non-existent file), etc.
For example,
foo.null?RES=640x480&CHANNELS=3
would specify a null file with resolution 640x480 and 3 channels.
Token/value pairs accepted are
RES=1024x1024 set resolution (3D example: 256x256x100)
CHANNELS=4 set number of channels
TILES=64x64 makes it look like a tiled image with tile size
TYPE=uint8 set the pixel data type
PIXEL=r,g,b,... set pixel values (comma separates channel values)
TEX=1 make it look like a full MIP-mapped texture
attrib=value anything else will set metadata!1 parent 890e4c3 commit 27e0d83
File tree
6 files changed
+412
-1
lines changed- src
- libOpenImageIO
- null.imageio
- testsuite/null
- ref
6 files changed
+412
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
| 240 | + | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| 246 | + | |
246 | 247 | | |
247 | 248 | | |
248 | 249 | | |
| |||
311 | 312 | | |
312 | 313 | | |
313 | 314 | | |
| 315 | + | |
314 | 316 | | |
315 | 317 | | |
316 | 318 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments