Platforms to show: All Mac Windows Linux Cross-Platform
PNGReaderMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | PNG | MBS Images Plugin | 9.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Example:
dim Current as PictureMBS // global
dim f as FolderItem
f=GetopenFolderItem(FileTypes.Png)
if f<>Nil then
Current=nil
dim p as new PNGReaderMBS
if p.OpenFile(f) then
if p.ApplyOptions(0) then
Current=new PictureMBS(p.Width,p.Height,PictureMBS.ImageFormatRGB)
dim i,c as Integer
c=p.Height-1
for i=0 to c
Current.RowInFormat(i, PictureMBS.ImageFormatRGBA)=p.ReadRow
next
end if
end if
end if
Use this class to read PNG files row by row as memoryblock.
Based on LibPNG.
- 2 events
- 28 properties
- property AllowDamaged as Boolean
- property BitDepth as Integer
- property ChunkCacheMax as UInt32
- property ChunkMallocMax as UInt64
- property ColorType as Integer
- property CompressionBufferSize as UInt64
- property ExpandGrayToRGB as Boolean
- property HasTransparency as Boolean
- property Height as Integer
- property InterlaceType as Integer
- property Interlacing as Integer
- property InvertAlpha as Boolean
- property Mask as Picture
- property OriginalColorType as Integer
- property Pict as Picture
- property RGBToGray as Boolean
- property RGBToGrayErrorAction as Integer
- property RGBToGrayGreen as Double
- property RGBToGrayRed as Double
- property SourceData as String
- property SourceFile as FolderItem
- property SourcePath as String
- property StripAlpha as Boolean
- property SwapRB as Boolean
- property UseFiller as Boolean
- property UserHeightMaximum as UInt32
- property UserWidthMaximum as UInt32
- property Width as Integer
- 17 methods
- method ApplyOptions(gamma as double = 0.0, ScreenGamma as double = -1.0) as boolean
- method CombinePictureWithMask as picture
- method Open(file as folderitem, data as string) as boolean
- method OpenData(data as string) as boolean
- method OpenFile(file as folderitem) as boolean
- method OpenFile(Path as String) as boolean
- method ReadEXIF(byref exif as string) as boolean
- method ReadHeader as Boolean
- method ReadICCProfile(byref name as string, byref compression as Integer, byref profile as string) as boolean
- method ReadPicture as boolean
- method ReadRow as memoryblock
- method ReadRow(mem as memoryblock) as boolean
- method ReadRowAlphaOnly(mem as memoryblock) as boolean
- method ReadRowMaskOnly(mem as memoryblock) as boolean
- method ReadsRGBTag(byref file_srgb_intent as Integer) as boolean
- method RowBytes as Integer
- shared method PNGLibVersion as string
This class has no sub classes.
Some examples using this class:
- /Images/JPEG/PNG to JPEG with ICC Profile
- /Images/LargePicture/PictureMBS display huge picture
- /Images/LargePicture/PNG Load and Save
- /Images/PNG/Load iPhone PNG/Load iPhone PNG
- /Images/PNG/PNG Load To MemoryBlocks
- /Images/PNG/png with profile
Blog Entries
- MBS Xojo Plugins, version 20.2pr7
- MonkeyBread Software Releases the MBS Xojo Plugins in version 19.5
- MBS Xojo Plugins, version 19.5pr7
- MBS Xojo Plugins, version 19.5pr6
- MBS Xojo Plugins, version 19.0pr6
- MBS Real Studio Plugins, version 12.4pr3
- MBS Real Studio Plugins, version 11.3pr13
- MBS Plugins 11.1 Release notes
- MBS Plugins 10.3 Release Notes
- MBS REALbasic Plugins, version 10.3pr4
Xojo Developer Magazine
The items on this page are in the following plugins: MBS Images Plugin.

Links
MBS Xojo blog