Declaring Type: ImageCompressor
Namespace: Mindee.Image
Assembly: Mindee
Assembly Version: 3.21.0+995c229708fe61b0dacbe0bfca8ad9e39db87623
Signature | Description |
---|---|
CompressImage(SKBitmap, int, int, int) | Resize and\/or compress an SKBitmap. This assumes the ratio was provided before hands. |
CompressImage(byte[], int, int?, int?) | Resize and\/or compress an image using SkiaSharp. This maintains the provided ratio. |
Resize and\/or compress an SKBitmap. This assumes the ratio was provided before hands.
public static byte[] CompressImage(SKBitmap original, int quality, int finalWidth, int finalHeight);
original
SKBitmap
Original, unedited bitmap.
quality
int
Quality of the final file.
finalWidth
int
Maximum width. If not specified, the horizontal ratio will remain the same.
finalHeight
int
Maximum height. If not specified, the vertical ratio will remain the same
byte[]
A byte array holding a compressed image.
Resize and\/or compress an image using SkiaSharp. This maintains the provided ratio.
public static byte[] CompressImage(byte[] imageData, int quality = 85, int? maxWidth = null, int? maxHeight = null);
imageData
byte[]
Byte array representing the content of the image.
quality
int
Quality of the final file.
maxWidth
Nullable<int>
Maximum width. If not specified, the horizontal ratio will remain the same.
maxHeight
Nullable<int>
Maximum height. If not specified, the vertical ratio will remain the same.
byte[]
A byte array holding a compressed image.
Documentation generated by MdDocs