Interface IImageProcessingService
Interface for image processing service
public interface IImageProcessingService
- Extension Methods
Methods
TryGetImageDimensions(byte[], out (int imageWidth, int imageHeight))
Gets dimensions of an image.
bool TryGetImageDimensions(byte[] image, out (int imageWidth, int imageHeight) dimensions)
Parameters
imagebyte[]The image in binary data form.
dimensions(int imageWidth, int imageHeight)A tuple containing the width and height of the image.
Returns
- bool
trueif the image dimensions were retrieved. Otherwisefalse.
TryResize(byte[], int, int, out byte[])
Resizes the specified image.
bool TryResize(byte[] image, int width, int height, out byte[] resizedImage)
Parameters
imagebyte[]The image to resize in binary data form.
widthintThe width to resize the image to.
heightintThe height to resize the image to.
resizedImagebyte[]Binary data of resized image if resize is successful. Otherwise
null.
Returns
- bool
trueif the image was resized. Otherwisefalse.