Platforms to show: All Mac Windows Linux Cross-Platform

PNGStringToPictureMBS(data as string, gamma as single = 0.0, AllowDamaged as boolean = false) as picture

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method PNG MBS Images Plugin 6.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads PNG data from a string variable.

If the picture has an alpah channel the returned picture will have a mask.

Returns picture on success and nil on failure.

The gamma parameter defines what gamma correction is applied:
positive value: use the value as the gamma correction
zero: use default value (or value saved in file itself)
negative value: do not correct gamma

AllowDamaged: Whether to allow damaged PNG files to return a part of the image as picture.

Some examples using this global method:

Some FAQ entries about this method:

Blog Entries

The items on this page are in the following plugins: MBS Images Plugin.


The biggest plugin in space...