PeachDrawing.Core

PeachDrawing.Core

Image Class

Adapter for platform specific image object - used to render images.

public abstract class Image : System.IDisposable

Inheritance System.Object → Image

Implements System.IDisposable

Properties  
Height Get the height, in pixels, of the image.
Interpolate Whether the PDF viewer should smooth this image when it’s drawn at a size other than its native pixel dimensions. Defaults to true (the common case: photos/gradients look better smoothed when scaled). A repeating background-image tile - see Html.Core.Handlers.BackgroundImageDrawHandler - sets this to false while painting: a tiled pattern is drawn many times edge-to-edge, and any softened/blurred edge (from interpolation) leaves visible seams between tiles/layers instead of a crisp, contiguous pattern - most visibly, two intentionally-offset transparent tiles meant to interlock into one solid color (Acid2’s own checkerboard-interlock background trick) never resolve to solid at any rasterization DPI above the image’s tiny native size, since blurred edges from two independently-smoothed layers don’t cancel out the way crisp, hard pixel edges would.
Width Get the width, in pixels, of the image.
Methods  
Dispose() Releases any native resource this image owns.
GetPixels() This image’s decoded pixels, or null when it has none to decode (a vector Form XObject tile - see GraphicsAdapter.CreateTile - has no raster content at all). Lets any Canvas backend sample an image’s actual pixels without knowing which concrete Image decoded them - the backend-agnostic replacement for downcasting to a specific concrete image type and reading its native decoded form directly.