Image converted to a 1-bit ^GFA graphic (Z64 compressed) or stored on the printer (~DG + ^XG).
Constructors
| Signature | Description |
# ImageItem() | |
Properties
| Property | Type | Description |
Dither { get; set; } | bool | Legacy: Floyd–Steinberg dithering (same as ImageItem.DitherMethod = FloydSteinberg). |
DitherMethod { get; set; } | DitherMethod | |
Flip { get; set; } | ImageFlip | |
Height { get; set; } | double? | |
HideIfNotFound { get; set; } | bool | Emit nothing (instead of throwing) when ImageItem.SourceFile doesn't exist. |
ImageData { get; set; } | byte[] | PNG/JPEG/... bytes, stored as base64 in JSON. |
IsPrinterReference { get; } | bool | A reference to a graphic stored on the printer (ImageItem.UsePrinterStorage without image data): printed as ^XG,1,1 at its stored size and unturned (^XG has no rotation; Label.Validate reports a rotation). ImageItem.Width/ImageItem.Height are then only the placeholder box for editors – the print stays 1:1. Previews draw the graphic from the renderer's ZplResourceStore (nothing when it is not there). |
LockAspectRatio { get; set; } | ImageAspectRatio | |
ReverseEffect { get; set; } | bool | Invert the image (negative), independent of ^FR. |
SourceDpi { get; set; } | double? | Resolution of the source pixels; with no Width/Height the image keeps its physical size (null = 1 px per dot). |
SourceFile { get; set; } | string | Image file loaded when generating (used when ImageItem.ImageData is empty). |
StorageName { get; set; } | string | Printer name for ImageItem.UsePrinterStorage, e.g. "R:LOGO.GRF" (null = derived from the content; required for a reference without image data). |
Threshold { get; set; } | byte | |
UsePrinterStorage { get; set; } | bool | Download the graphic once (~DG) and reference it with ^XG instead of repeating ^GFA data. Without image data (ImageItem.ImageData empty, no ImageItem.SourceFile, not bound) the item only references a graphic that is already in the printer's memory: ^FOx,y^XG,1,1^FS, no ~DG and no ^GFA (see ImageItem.IsPrinterReference). |
Width { get; set; } | double? | Target size in label units; null keeps the pixel size (1 px = 1 dot) or follows the aspect ratio. |
Methods
| Method Signature | Returns | Description |
# ToZpl(ZplContext ctx) | string | |