pub type PixelImage<Storage, Channels> = Image<Layer<SpecificChannels<Storage, Channels>>>;
Expand description
This image type contains a single layer containing a user-defined type of pixels.
Aliased Type§
struct PixelImage<Storage, Channels> {
pub attributes: ImageAttributes,
pub layer_data: Layer<SpecificChannels<Storage, Channels>>,
}
Fields§
§attributes: ImageAttributes
Attributes that apply to the whole image file. These attributes appear in each layer of the file. Excludes technical meta data. Each layer in this image also has its own attributes.
layer_data: Layer<SpecificChannels<Storage, Channels>>
The layers contained in the image file.
Can be either a single Layer
or a list of layers.
Implementations
Source§impl<'s, InnerLayers> Image<InnerLayers>where
InnerLayers: WritableLayers<'s> + 's,
impl<'s, InnerLayers> Image<InnerLayers>where
InnerLayers: WritableLayers<'s> + 's,
Sourcepub fn with_layer<NewChannels>(
self,
layer: Layer<NewChannels>,
) -> Image<Recursive<InnerLayers, Layer<NewChannels>>>where
NewChannels: 's + WritableChannels<'s>,
pub fn with_layer<NewChannels>(
self,
layer: Layer<NewChannels>,
) -> Image<Recursive<InnerLayers, Layer<NewChannels>>>where
NewChannels: 's + WritableChannels<'s>,
Add another layer to this image. The layer type does not have to equal the existing layers in this image.
Source§impl<'s, ChannelData> Image<Layer<ChannelData>>where
ChannelData: WritableChannels<'s> + 's,
impl<'s, ChannelData> Image<Layer<ChannelData>>where
ChannelData: WritableChannels<'s> + 's,
Sourcepub fn from_layer(layer: Layer<ChannelData>) -> Self
pub fn from_layer(layer: Layer<ChannelData>) -> Self
Uses the display position and size to the channel position and size of the layer.
Sourcepub fn from_encoded_channels(
size: impl Into<Vec2<usize>>,
encoding: Encoding,
channels: ChannelData,
) -> Self
pub fn from_encoded_channels( size: impl Into<Vec2<usize>>, encoding: Encoding, channels: ChannelData, ) -> Self
Uses empty attributes.
Sourcepub fn from_channels(
size: impl Into<Vec2<usize>>,
channels: ChannelData,
) -> Self
pub fn from_channels( size: impl Into<Vec2<usize>>, channels: ChannelData, ) -> Self
Uses empty attributes and fast compression.
Source§impl<'s, LayerData> Image<LayerData>where
LayerData: WritableLayers<'s> + 's,
impl<'s, LayerData> Image<LayerData>where
LayerData: WritableLayers<'s> + 's,
Sourcepub fn new(image_attributes: ImageAttributes, layer_data: LayerData) -> Self
pub fn new(image_attributes: ImageAttributes, layer_data: LayerData) -> Self
Create an image with one or multiple layers. The layer can be a Layer
, or Layers
small vector, or Vec<Layer>
or &[Layer]
.
Trait Implementations
Source§impl<C> ValidateResult for Image<C>where
C: ValidateResult,
impl<C> ValidateResult for Image<C>where
C: ValidateResult,
Source§fn validate_result(
&self,
other: &Self,
options: ValidationOptions,
location: impl Fn() -> String,
) -> ValidationResult
fn validate_result( &self, other: &Self, options: ValidationOptions, location: impl Fn() -> String, ) -> ValidationResult
Compare self with the other.
Exceptional behaviour: Read more
Source§fn assert_equals_result(&self, result: &Self)
fn assert_equals_result(&self, result: &Self)
Compare self with the other. Panics if not equal. Read more