[][src]Struct psd::PsdLayer

pub struct PsdLayer { /* fields omitted */ }

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: i32,
    layer_left: i32,
    layer_bottom: i32,
    layer_right: i32,
    psd_width: u32,
    psd_height: u32
) -> PsdLayer
[src]

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]

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

impl Debug for PsdLayer[src]

Auto Trait Implementations

impl Send for PsdLayer

impl Sync for PsdLayer

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.