PnmPixelLayout Enum

The pixel layout written by PnmEncoder.

public enum PnmPixelLayout

Fields

NameValueDescription
Auto0The variant follows the pixel format: a portable graymap for gray pixel formats, a portable pixmap for pixel formats without alpha and a portable arbitrary map for pixel formats with alpha. This is the default: no sample and no alpha value is ever discarded.
Bitmap1A portable bitmap, one bit per pixel (P4, or P1 with PnmEncoding.Plain). Every pixel must be exactly black or exactly white, whatever the pixel format: any other pixel is rejected with an UnsupportedImageFeatureException, because the encoder never thresholds nor dithers. Alpha is discarded, so a pixel format with alpha requires PnmEncoder.BackgroundColor unless every pixel is opaque.