pub enum ImageSize {
}Expand description
Image size options
glm-image accepts dimensions from 1,024 through 2,048 pixels, divisible
by 32, with at most 2²² total pixels. Other models accept dimensions from
512 through 2,048 pixels, divisible by 16, with at most 2²¹ total pixels.
Variants§
Size1280x1280
1280x1280 pixels (glm-image default)
Size1568x1056
1568x1056 pixels
Size1056x1568
1056x1568 pixels
Size1472x1088
1472x1088 pixels
Size1088x1472
1088x1472 pixels
Size1728x960
1728x960 pixels
Size960x1728
960x1728 pixels
Size1024x1024
1024x1024 pixels
Size768x1344
768x1344 pixels
Size864x1152
864x1152 pixels
Size1344x768
1344x768 pixels
Size1152x864
1152x864 pixels
Size1440x720
1440x720 pixels
Size720x1440
720x1440 pixels
Custom
Custom dimensions in width x height format
Implementations§
Source§impl ImageSize
impl ImageSize
Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Validate the size against the non-glm-image constraints.
This method retains the original SDK behavior. Request-body validation automatically applies the correct rules for the selected model.
Sourcepub fn dimensions(&self) -> (u32, u32)
pub fn dimensions(&self) -> (u32, u32)
Get the dimensions as (width, height)
Trait Implementations§
impl Copy for ImageSize
impl Eq for ImageSize
impl StructuralPartialEq for ImageSize
Auto Trait Implementations§
impl Freeze for ImageSize
impl RefUnwindSafe for ImageSize
impl Send for ImageSize
impl Sync for ImageSize
impl Unpin for ImageSize
impl UnsafeUnpin for ImageSize
impl UnwindSafe for ImageSize
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.