[−][src]Struct psd::PsdLayer
Information about a layer in a PSD file.
TODO: I set all of these pub during a late evening of getting to get things working. Replace with private and accessor methods so that this crate is as locked down as possible (to allow us to be strict).
Methods
impl PsdLayer
[src]
pub fn new(
name: String,
layer_top: u32,
layer_left: u32,
layer_bottom: u32,
layer_right: u32,
psd_width: u32,
psd_height: u32
) -> PsdLayer
[src]
name: String,
layer_top: u32,
layer_left: u32,
layer_bottom: u32,
layer_right: u32,
psd_width: u32,
psd_height: u32
) -> PsdLayer
Create a new photoshop layer
pub fn name(&self) -> &str
[src]
Get the name of the layer
pub fn width(&self) -> u16
[src]
The width of the layer
pub fn height(&self) -> u16
[src]
The height of the layer
pub fn compression(
&self,
channel: &PsdChannelKind
) -> Result<PsdChannelCompression, Error>
[src]
&self,
channel: &PsdChannelKind
) -> Result<PsdChannelCompression, Error>
Get the compression level for one of this layer's channels
pub fn rgba(&self) -> Result<Vec<u8>, Error>
[src]
Create a vector that interleaves the red, green, blue and alpha channels in this PSD
vec![R, G, B, A, R, G, B, A, ...]
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,