Image

Struct Image 

Source
pub struct Image {
    pub master_image: Option<LrId>,
    pub copy_name: Option<String>,
    pub rating: Option<i64>,
    pub root_file: LrId,
    pub file_format: String,
    pub pick: i64,
    pub orientation: Option<String>,
    pub capture_time: String,
    pub xmp: String,
    pub xmp_embedded: bool,
    pub xmp_external_dirty: bool,
    pub properties: Option<Properties>,
    /* private fields */
}
Expand description

An image in the Catalog. Requires a LibraryFile backing it

Fields§

§master_image: Option<LrId>

If this a copy, id of the Image it is a copy of

§copy_name: Option<String>

Name of copy.

§rating: Option<i64>

Star rating

§root_file: LrId

Backing LibraryFile id.

§file_format: String

File format

§pick: i64

Pick. -1, 0, 1

§orientation: Option<String>

Orientation string (set Lr format documentation) Convert to EXIF orientation with self.exif_orientation().

§capture_time: String

Capture date.

§xmp: String

XMP block as stored in the database. If len() == 0, there is no XMP.

§xmp_embedded: bool

XMP is embedded: whether the XMP packet in the file like a JPEG, or in a sidecar like in a RAW (non DNG) file, regardless of xmp.

§xmp_external_dirty: bool

The external XMP (ie not in the database) is different.

§properties: Option<Properties>

Misc properties from the Adobe_imageProperties table

Implementations§

Source§

impl Image

Source

pub fn exif_orientation(&self) -> i32

Return the Exif value for the image orientation No orientation = 0. Error = -1 or unknown value Otherwise the Exif value for orientation

Trait Implementations§

Source§

impl LrObject for Image

Source§

fn id(&self) -> LrId

The local id
Source§

fn uuid(&self) -> &str

The global id. A valid UUID. Doesn’t seem to be used anywhere though.

Auto Trait Implementations§

§

impl Freeze for Image

§

impl RefUnwindSafe for Image

§

impl Send for Image

§

impl Sync for Image

§

impl Unpin for Image

§

impl UnwindSafe for Image

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.