Class RDFormsPicture
Decodes the pictures components hold, such as a Picture, for drawing.
public static class RDFormsPicture
- Inheritance
-
RDFormsPicture
- Inherited Members
Remarks
A picture is decoded only when Inspect(byte[]?, out PictureInfo) accepts its header, so a decode allocates at most
RDCore.SDK.Workspace.Pictures.PictureHeader.MaxPixels pixels. Its pixels are those the SDK decodes (RDCore.SDK.Workspace.Pictures.PictureDecoder), alpha included, from
the picture LoadPicture makes of the same bytes (TryLoad(ReadOnlyMemory<byte>, int, int, Func<int>, out StdPictureObject)): an icon or a cursor draws the image
LoadPicture loads when asked for no size. A picture LoadPicture refuses, or whose pixels the SDK does not decode, is refused
the same way. Metafiles are recognized and not drawn.
Properties
DecodesOnThisThread
How many pictures this thread has decoded since it started. The controls that hold the same picture bytes share one decode, so setting one picture on any number of controls counts one.
public static int DecodesOnThisThread { get; }
Property Value
Methods
Decode(byte[]?, out FormError?)
Decodes a picture.
public static Bitmap? Decode(byte[]? bytes, out FormError? error)
Parameters
bytesbyte[]The picture, as its file holds it, or null for none.
errorFormError?InvalidPicture where the picture is refused, by Inspect(byte[]?, out PictureInfo) or by the decoder; otherwise null.
Returns
- Bitmap
The picture, or null where there is none, it is refused, or it is a metafile. The caller disposes it.