Platforms to show: All Mac Windows Linux Cross-Platform
Back to PNGReaderMBS class.
PNGReaderMBS.ApplyOptions(gamma as double = 0.0, ScreenGamma as double = -1.0) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PNG | MBS Images Plugin | 9.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
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
Added ScreenGamma parameter in plugin version 15.2. If you set both gamma and Screengamma to a value > 0.0, the plugin will use those gamma values. If both are equal, no gamma correction is made.
16-bit images are always reduced to 8-bit images.
Returns true on success and false on failure. Calls ReadHeader method if needed.
Some examples using this method:
PNGReaderMBS.CombinePictureWithMask as picture
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PNG | MBS Images Plugin | 9.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
PNGReaderMBS.Open(file as folderitem, data as string) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PNG | MBS Images Plugin | 9.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns true on success.
PNGReaderMBS.OpenData(data as string) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PNG | MBS Images Plugin | 9.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns true on success.
PNGReaderMBS.OpenFile(file as folderitem) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PNG | MBS Images Plugin | 9.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns true on success.
See also:
PNGReaderMBS.OpenFile(Path as String) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PNG | MBS Images Plugin | 19.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns true on success.
See also:
PNGReaderMBS.OpenSpecialData(data as string) as boolean Deprecated
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PNG | MBS Images Plugin | 10.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This function can be used to read PNG files made for the Apple iPhone. The PNG is converted from the Apple format to the normal PNG format and passed to OpenData. In the SourceData property you can get the modified PNG data. Still this modified PNG data has the channels swapped, so you should read the image with the pict property.
On Mac OS X 10.8, the NSImage class also reads iOS optimized PNG files.
Deprecated as it does not read all files and we can't fix this old code. Please use a command line tool to convert instead.
PNGReaderMBS.ReadEXIF(byref exif as string) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PNG | MBS Images Plugin | 19.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns true on success or false on failure.
PNGReaderMBS.ReadHeader as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PNG | MBS Images Plugin | 19.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This reads header and fill properties Width, Height, ColorType, OriginalColorType, InterlaceType and BitDepth.
Returns true on success and false on failure.
PNGReaderMBS.ReadICCProfile(byref name as string, byref compression as Integer, byref profile as string) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PNG | MBS Images Plugin | 9.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Name is the profile name, compression the method used to compress the profile data and profile a string with the content of the profile as binary data.
Returns true on success.
Some examples using this method:
PNGReaderMBS.ReadPicture as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PNG | MBS Images Plugin | 9.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns true on success.
Some examples using this method:
PNGReaderMBS.ReadRow as memoryblock
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PNG | MBS Images Plugin | 9.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns nil on any error.
Format is RGBA as in the example with 4 bytes per pixel.
See also:
Some examples using this method:
PNGReaderMBS.ReadRow(mem as memoryblock) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PNG | MBS Images Plugin | 11.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns false on any error and true on success.
Format is RGBA as in the example with 4 bytes per pixel.
Make sure the memoryblock is big enough. Else you risk a crash.
See also PNGReaderMBS.RowBytes.
ReadRow with reusing memoryblock is faster than allocating a new one for each row.
See also:
PNGReaderMBS.ReadRowAlphaOnly(mem as memoryblock) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PNG | MBS Images Plugin | 14.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns false on any error and true on success.
Format is alpha channel as in the example with one byte per pixel.
Make sure the memoryblock has size from RowBytes property. Else you risk a crash.
The data in memoryblock is width bytes long, 1/4 of the size of the memoryblock.
See also PNGReaderMBS.RowBytes.
ReadRow with reusing memoryblock is faster than allocating a new one for each row.
PNGReaderMBS.ReadRowMaskOnly(mem as memoryblock) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PNG | MBS Images Plugin | 14.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns false on any error and true on success.
Format is mask (inverse alpha) as in the example with one byte per pixel.
Make sure the memoryblock has size from RowBytes property. Else you risk a crash.
The data in memoryblock is width bytes long, 1/4 of the size of the memoryblock.
See also PNGReaderMBS.RowBytes.
ReadRow with reusing memoryblock is faster than allocating a new one for each row.
PNGReaderMBS.ReadsRGBTag(byref file_srgb_intent as Integer) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PNG | MBS Images Plugin | 9.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns true if the value was read into the given variable.
Some examples using this method:
PNGReaderMBS.RowBytes as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | PNG | MBS Images Plugin | 9.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The items on this page are in the following plugins: MBS Images Plugin.