monks/image_rendering
The image-rendering CSS property sets an image scaling algorithm. The property applies to an element itself, to any images set in its other properties, and to its descendants.
Values
pub const auto_: #(String, String)
- : The scaling algorithm is UA dependent. Since version 1.9 (Firefox 3.0), Gecko uses bilinear resampling (high quality).
pub const crisp_edges: #(String, String)
- : The image is scaled with an algorithm such as “nearest neighbor” that preserves contrast and edges in the image. Generally intended for images such as pixel art or line drawings, no blurring or color smoothing occurs.
pub const optimize_contrast: #(String, String)
optimize-contrast value of image-rendering
pub const optimize_quality: #(String, String)
optimizeQuality value of image-rendering
pub const optimize_speed: #(String, String)
optimizeSpeed value of image-rendering
pub const pixelated: #(String, String)
- : The image is scaled with the “nearest neighbor” or similar algorithm to the nearest integer multiple of the original image size, then uses smooth interpolation to bring the image to the final desired size. This is intended to preserve a “pixelated” look without introducing scaling artifacts when the upscaled resolution isn’t an integer multiple of the original.> [!NOTE]> The values
optimizeQualityandoptimizeSpeedpresent in an early draft (and coming from its SVG counterpart {{SVGAttr(“image-rendering”)}}) are defined as synonyms for thesmoothandpixelatedvalues respectively.> [!NOTE]> The CSS images module defines ahigh-qualityvalue for theimage-renderingproperty to provide a preference for higher-quality scaling, however, this is not supported in any browsers.
pub const revert_layer: #(String, String)