pub struct DynamicImage(pub DynamicImage);

Tuple Fields

0: DynamicImage

Methods from Deref<Target = DynamicImage>

👎 Deprecated:

replaced by to_rgb8

Returns a copy of this image as an RGB image.

Returns a copy of this image as an RGB image.

Returns a copy of this image as an RGB image.

👎 Deprecated:

replaced by to_rgba8

Returns a copy of this image as an RGBA image.

Returns a copy of this image as an RGBA image.

Returns a copy of this image as an RGBA image.

👎 Deprecated:

replaced by to_bgr8

Returns a copy of this image as an BGR image.

Returns a copy of this image as an BGR image.

👎 Deprecated:

replaced by to_bgra8

Returns a copy of this image as an BGRA image.

Returns a copy of this image as an BGRA image.

👎 Deprecated:

replaced by to_luma8

Returns a copy of this image as a Luma image.

Returns a copy of this image as a Luma image.

Returns a copy of this image as a Luma image.

👎 Deprecated:

replaced by to_luma_alpha8

Returns a copy of this image as a LumaA image.

Returns a copy of this image as a LumaA image.

Returns a copy of this image as a LumaA image.

Return a cut-out of this image delimited by the bounding rectangle.

Note: this method does not modify the object, and its signature will be replaced with crop_imm()’s in the 0.24 release

Return a cut-out of this image delimited by the bounding rectangle.

Return a reference to an 8bit RGB image

Return a mutable reference to an 8bit RGB image

Return a reference to an 8bit BGR image

Return a mutable reference to an 8bit BGR image

Return a reference to an 8bit RGBA image

Return a mutable reference to an 8bit RGBA image

Return a reference to an 8bit BGRA image

Return a mutable reference to an 8bit RGBA image

Return a reference to an 8bit Grayscale image

Return a mutable reference to an 8bit Grayscale image

Return a reference to an 8bit Grayscale image with an alpha channel

Return a mutable reference to an 8bit Grayscale image with an alpha channel

Return a reference to an 16bit RGB image

Return a mutable reference to an 16bit RGB image

Return a reference to an 16bit RGBA image

Return a mutable reference to an 16bit RGBA image

Return a reference to an 16bit Grayscale image

Return a mutable reference to an 16bit Grayscale image

Return a reference to an 16bit Grayscale image with an alpha channel

Return a mutable reference to an 16bit Grayscale image with an alpha channel

Return a view on the raw sample buffer for 8 bit per channel images.

Return a view on the raw sample buffer for 16 bit per channel images.

Return this image’s pixels as a native endian byte slice.

Return a copy of this image’s pixels as a byte vector.

Return this image’s color type.

Return a grayscale version of this image.

Invert the colors of this image. This method operates inplace.

Resize this image using the specified filter algorithm. Returns a new image. The image’s aspect ratio is preserved. The image is scaled to the maximum possible size that fits within the bounds specified by nwidth and nheight.

Resize this image using the specified filter algorithm. Returns a new image. Does not preserve aspect ratio. nwidth and nheight are the new image’s dimensions

Scale this image down to fit within a specific size. Returns a new image. The image’s aspect ratio is preserved. The image is scaled to the maximum possible size that fits within the bounds specified by nwidth and nheight.

This method uses a fast integer algorithm where each source pixel contributes to exactly one target pixel. May give aliasing artifacts if new size is close to old size.

Scale this image down to a specific size. Returns a new image. Does not preserve aspect ratio. nwidth and nheight are the new image’s dimensions. This method uses a fast integer algorithm where each source pixel contributes to exactly one target pixel. May give aliasing artifacts if new size is close to old size.

Resize this image using the specified filter algorithm. Returns a new image. The image’s aspect ratio is preserved. The image is scaled to the maximum possible size that fits within the larger (relative to aspect ratio) of the bounds specified by nwidth and nheight, then cropped to fit within the other bound.

Performs a Gaussian blur on this image. sigma is a measure of how much to blur by.

Performs an unsharpen mask on this image. sigma is the amount to blur the image by. threshold is a control of how much to sharpen.

See https://en.wikipedia.org/wiki/Unsharp_masking#Digital_unsharp_masking

Filters this image with the specified 3x3 kernel.

Adjust the contrast of this image. contrast is the amount to adjust the contrast by. Negative values decrease the contrast and positive values increase the contrast.

Brighten the pixels of this image. value is the amount to brighten each pixel by. Negative values decrease the brightness and positive values increase it.

Hue rotate the supplied image. value is the degrees to rotate each pixel by. 0 and 360 do nothing, the rest rotates by the given degree value. just like the css webkit filter hue-rotate(180)

Flip this image vertically

Flip this image horizontally

Rotate this image 90 degrees clockwise.

Rotate this image 180 degrees clockwise.

Rotate this image 270 degrees clockwise.

Encode this image and write it to w

Saves the buffer to a file at the path specified.

The image format is derived from the file extension.

Saves the buffer to a file at the specified path in the specified format.

See save_buffer_with_format for supported types.

Trait Implementations

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

The associated error which can be returned.

Future that resolves to a Self

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more