Platforms to show: All Mac Windows Linux Cross-Platform
PNGReaderMBS.ApplyOptions(gamma as double) as boolean
method, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: Applies various options.
Notes:
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
method, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: Applies various options.
Notes:
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
PNGReaderMBS.BitDepth as Integer
property, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The bit depth of the PNG file.
Notes: (Read and Write property)
property, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The bit depth of the PNG file.
Notes: (Read and Write property)
class PNGReaderMBS
class, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The class for reading PNG files.
Example:
class, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The class for reading PNG files.
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
Notes: Use this class to read PNG files row by row as memoryblock.PNGReaderMBS.ColorType as Integer
property, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The color type of the PNG file.
Notes:
The value is a combination of this constants:
The PNG library will convert on reading every row into 32bit RGBA, so don't worry about this.
(Read and Write property)
property, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The color type of the PNG file.
Notes:
The value is a combination of this constants:
| PNG_COLOR_MASK_PALETTE | = 1 |
| PNG_COLOR_MASK_COLOR | = 2 |
| PNG_COLOR_MASK_ALPHA | = 4 |
The PNG library will convert on reading every row into 32bit RGBA, so don't worry about this.
(Read and Write property)
PNGReaderMBS.CombinePictureWithMask as picture
method, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: Combines the pict and the mask property to a picture with mask.
method, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: Combines the pict and the mask property to a picture with mask.
PNGReaderMBS.Height as Integer
property, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The height of the picture in pixels.
Notes: (Read and Write property)
property, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The height of the picture in pixels.
Notes: (Read and Write property)
PNGReaderMBS.InterlaceType as Integer
property, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The interlace setting.
Notes: (Read and Write property)
property, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The interlace setting.
Notes: (Read and Write property)
PNGReaderMBS.Interlacing as Integer
property, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.1, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: Whether the png file is interlaced.
Notes:
Value is 1 if not interlaced and 7 if interlaced.
(Read and Write property)
property, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.1, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: Whether the png file is interlaced.
Notes:
Value is 1 if not interlaced and 7 if interlaced.
(Read and Write property)
PNGReaderMBS.Mask as Picture
property, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The mask of the picture.
Notes: (Read and Write property)
property, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The mask of the picture.
Notes: (Read and Write property)
PNGReaderMBS.Open(file as folderitem, data as string) as boolean
method, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: Opens either the data string or the file.
Notes: Returns true on success.
method, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: Opens either the data string or the file.
Notes: Returns true on success.
PNGReaderMBS.OpenData(data as string) as boolean
method, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: Opens a PNG file from the data string.
Notes: Returns true on success.
method, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: Opens a PNG file from the data string.
Notes: Returns true on success.
PNGReaderMBS.OpenFile(file as folderitem) as boolean
method, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: Opens a file.
Notes: Returns true on success.
method, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: Opens a file.
Notes: Returns true on success.
PNGReaderMBS.Pict as Picture
property, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The picture read.
Notes: (Read and Write property)
property, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The picture read.
Notes: (Read and Write property)
PNGReaderMBS.PNGLibVersion as string
shared method, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The version of the PNG library compiled into the plugin.
shared method, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The version of the PNG library compiled into the plugin.
PNGReaderMBS.ReadICCProfile(byref name as string, byref compression as integer, byref profile as string) as boolean
method, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: Reads the ICC Profile from the PNG file.
Notes:
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.
method, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: Reads the ICC Profile from the PNG file.
Notes:
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.
PNGReaderMBS.ReadPicture as boolean
method, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: Reads the picture into the pict and mask properties.
Notes: Returns true on success.
method, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: Reads the picture into the pict and mask properties.
Notes: Returns true on success.
PNGReaderMBS.ReadRow as memoryblock
method, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: Reads the next row as a memoryblock.
Example:
Returns nil on any error.
Format is RGBA as in the example with 4 bytes per pixel.
method, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: Reads the next row as a memoryblock.
Example:
dim fSource as FolderItem = SpecialFolder.Desktop.Child("test.png") // some png with alpha
dim oPNGInput as new PNGReaderMBS
If oPNGInput.OpenFile(fSource) Then
If oPNGInput.ApplyOptions(0) Then
dim imgSource as New PictureMBS(oPNGInput.Width, oPNGInput.Height, PictureMBS.ImageFormatRGBA)
' Read row by row the file and puts it in a PictureMBS instance
dim nMax as integer = oPNGInput.Height - 1
For nInd as integer = 0 To nMax
imgSource.RowInFormat(nInd, PictureMBS.ImageFormatRGBA, true) = oPNGInput.ReadRow()
Next
' show only alpha/mask channel
Backdrop=imgSource.AlphaChannel.CopyPicture
' show Picture without mask
Backdrop=imgSource.CopyPicture
' show picture with mask
Backdrop=imgSource.CopyPictureWithMask
End If
End If
Notes: Returns nil on any error.
Format is RGBA as in the example with 4 bytes per pixel.
PNGReaderMBS.ReadsRGBTag(byref file_srgb_intent as integer) as boolean
method, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: Reads the sRGB tag.
Notes: Returns true if the value was read into the given variable.
method, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: Reads the sRGB tag.
Notes: Returns true if the value was read into the given variable.
PNGReaderMBS.RowBytes as integer
method, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The length of each row in bytes.
method, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The length of each row in bytes.
PNGReaderMBS.Width as Integer
property, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The width of the picture in pixels.
Notes: (Read and Write property)
property, PNG, MBS REALbasic PNG Plugin (PNG), class PNGReaderMBS, Console safe, Plugin version: 9.0, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.
Function: The width of the picture in pixels.
Notes: (Read and Write property)
The items on this page are in the following plugins: MBS REALbasic PNG Plugin.
Links
MBS Realbasic Plugins - Pfarrgemeinde Messdiener Nickenich