Expand description
How to read arbitrary but specific selection of arbitrary channels. This is not a zero-cost abstraction.
Structs§
- Collect
Pixels - Specifies how to collect all the specified channels into a number of individual pixels.
- Optional
Sample Reader - Reader for a single channel. Generic over the concrete sample type (f16, f32, u32). Can also skip reading a channel if it could not be found in the image.
- Read
Optional Channel - Used to read another specific channel from an image.
Contains the previous
ReadChannels
objects. - Read
Required Channel - Used to read another specific channel from an image.
Contains the previous
ReadChannels
objects. - Sample
Reader - Reader for a single channel. Generic over the concrete sample type (f16, f32, u32).
- Specific
Channels Reader - The reader that holds the temporary data that is required to read some specified channels.
Traits§
- Read
Specific Channel - Can be attached one more channel reader.
Call
required
oroptional
on this object to declare another channel to be read from the file. Callcollect_pixels
at last to define how the previously declared pixels should be stored. - Recursive
Pixel Reader - A reader containing sub-readers for reading the pixel content of an image.
Functions§
- read_
and_ 🔒convert_ all_ samples_ batched - Does the same as
convert_batch(in_bytes.chunks().map(From::from_bytes))
, but vectorized. Reads the samples for one line, using the sample type specified in the file, and then converts those to the desired sample types. Uses batches to allow vectorization, converting multiple values with one instruction.
Type Aliases§
- Read
Zero Channels - Read zero channels from an image. Call
with_named_channel
on this object to read as many channels as desired.