pub struct IccProfile<'a> { /* private fields */ }
Expand description
Writer for an ICC profile stream.
This struct is created by Chunk::icc_profile
.
Implementations§
source§impl<'a> IccProfile<'a>
impl<'a> IccProfile<'a>
sourcepub fn n(&mut self, n: i32) -> &mut Self
pub fn n(&mut self, n: i32) -> &mut Self
Write the /N
attribute. Required.
The number of components in the color space. Shall be 1, 3, or 4.
sourcepub fn alternate(&mut self) -> ColorSpace<'_>
pub fn alternate(&mut self) -> ColorSpace<'_>
Write the /Alternate
attribute with a color space.
The alternate color space to use when the ICC profile is not supported. Must be a color space with the same number of components as the ICC profile. Pattern color spaces are not allowed.
sourcepub fn alternate_name(&mut self, name: Name<'_>) -> &mut Self
pub fn alternate_name(&mut self, name: Name<'_>) -> &mut Self
Write the /Alternate
attribute with a name.
The alternate color space referenced by name must be registered in the current resource dictionary.
sourcepub fn range(&mut self, range: impl IntoIterator<Item = f32>) -> &mut Self
pub fn range(&mut self, range: impl IntoIterator<Item = f32>) -> &mut Self
Write the /Range
attribute.
Specifies the permissible range of values for each component. The array
shall contain 2 × N
numbers, where N
is the number of
components in the color space. The array is organized in pairs, where
the first value shall be the minimum value and the second shall be the
maximum value.
sourcepub fn metadata(&mut self, metadata: Ref) -> &mut Self
pub fn metadata(&mut self, metadata: Ref) -> &mut Self
Write the /Metadata
attribute.
A reference to a stream containing metadata for the ICC profile.
Methods from Deref<Target = Stream<'a>>§
sourcepub fn decode_parms(&mut self) -> DecodeParms<'_>
pub fn decode_parms(&mut self) -> DecodeParms<'_>
Start writing the /DecodeParms
attribute.
This is a dictionary that specifies parameters to be used in decoding
the stream data using the filter specified by the
/Filter
attribute.
Methods from Deref<Target = Dict<'a>>§
sourcepub fn insert(&mut self, key: Name<'_>) -> Obj<'_>
pub fn insert(&mut self, key: Name<'_>) -> Obj<'_>
Start writing a pair with an arbitrary value.
sourcepub fn pair<T: Primitive>(&mut self, key: Name<'_>, value: T) -> &mut Self
pub fn pair<T: Primitive>(&mut self, key: Name<'_>, value: T) -> &mut Self
Write a pair with a primitive value.
This is a shorthand for dict.insert(key).primitive(value)
.
sourcepub fn pairs<'n, T: Primitive>(
&mut self,
pairs: impl IntoIterator<Item = (Name<'n>, T)>,
) -> &mut Self
pub fn pairs<'n, T: Primitive>( &mut self, pairs: impl IntoIterator<Item = (Name<'n>, T)>, ) -> &mut Self
Write a sequence of pairs with primitive values.