Xojo Conferences

Platforms to show: All Mac Windows Linux Cross-Platform

JPEG2000MBS class

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class JPEG MBS Images Plugin 15.4 Yes Yes Yes Yes No
Function: The class for compress/decompress of JPEG 2000 images.
dim file as FolderItem = GetFolderItem("test.jp2")
dim stream as BinaryStream = BinaryStream.Open(file)
dim data as string = stream.Read(stream.Length)

dim jp2 as new JPEG2000MBS
if jp2.InitDecompress(data) then
MsgBox str(jp2.Width)+" x "+str(jp2.Height)
end if
Currently only supports RGB, RGBA and Grayscale images.

Please note that Jasper library used here is not very memory efficient and may run out of memory with huge images.

Feedback, Comments & Corrections

  • 6 properties
  • 6 methods
    • method Close
    • method Compress as Boolean
    • method GetRow(Index as Integer, Row as MemoryBlock = nil) as MemoryBlock
    • method InitCompress(Width as Integer, Height as Integer, BytesPerPixel as Integer, BytesPerRow as Integer = 0) as Boolean
    • method InitDecompress(ImageData as MemoryBlock) as Boolean
    • method SetRow(Index as Integer, Row as MemoryBlock) as Boolean
  • 3 shared methods
    • shared method Decode(Data as MemoryBlock) as Picture
    • shared method Decode(Data as string) as Picture
    • shared method Encode(pic as picture, Quality as Integer = 80) as MemoryBlock

This class has no sub classes.

Some examples which use this class:

Blog Entries

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

JavaVMMBS   -   JPEGExporterMBS

MBS FileMaker Plugins