RasterImage
Ecng.Drawing
Uncompressed, tightly packed RGBA8 pixels (top-to-bottom, left-to-right).
Methoden
Downscale
public RasterImage Downscale(int width, int height)
result = rasterImage.Downscale(width, height)
Reduces the picture. Every pixel of the result is the mean of the source area it covers, with colors weighted by alpha, so that transparent pixels lend no color to their neighbors.
EnsureDecodable
public static void EnsureDecodable(int width, int height)
RasterImage.EnsureDecodable(width, height)
Refuses a picture a decoder is about to allocate buffers for if it is larger than MaxPixels.
Orient
public RasterImage Orient(int orientation)
result = rasterImage.Orient(orientation)
Turns and mirrors the picture the way an Exif orientation asks for it to be shown.
- orientation
- The Exif orientation, 1 to 8; 1 leaves the picture as it is.
Felder
MaxPixels
public const int MaxPixels
value = RasterImage.MaxPixels
The largest picture the decoders take: its pixels alone are 100 MB.