#[non_exhaustive]pub struct Image {
pub uri: String,
pub resolution: Option<NormalizedCoordinate>,
pub alpha: f64,
/* private fields */
}
Expand description
Overlaid image.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.uri: String
Required. URI of the image in Cloud Storage. For example,
gs://bucket/inputs/image.png
. Only PNG and JPEG images are supported.
resolution: Option<NormalizedCoordinate>
Normalized image resolution, based on output video resolution. Valid
values: 0.0
–1.0
. To respect the original image aspect ratio, set
either x
or y
to 0.0
. To use the original image resolution, set
both x
and y
to 0.0
.
alpha: f64
Target image opacity. Valid values are from 1.0
(solid, default) to
0.0
(transparent), exclusive. Set this to a value greater than 0.0
.
Implementations§
Source§impl Image
impl Image
pub fn new() -> Self
Sourcepub fn set_resolution<T>(self, v: T) -> Selfwhere
T: Into<NormalizedCoordinate>,
pub fn set_resolution<T>(self, v: T) -> Selfwhere
T: Into<NormalizedCoordinate>,
Sets the value of resolution.
Sourcepub fn set_or_clear_resolution<T>(self, v: Option<T>) -> Selfwhere
T: Into<NormalizedCoordinate>,
pub fn set_or_clear_resolution<T>(self, v: Option<T>) -> Selfwhere
T: Into<NormalizedCoordinate>,
Sets or clears the value of resolution.
Trait Implementations§
impl StructuralPartialEq for Image
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> 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