Platforms to show: All Mac Windows Linux Cross-Platform
JPEGExporterMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | JPEG | MBS Images Plugin | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Example:
dim g as FolderItem
dim ji as JPEGImporterMBS
dim je as JPEGExporterMBS
dim f as FolderItem
dim m as MemoryBlock
// this code copies a JPG: CMYK or RGB
// import it
g=SpecialFolder.Desktop.Child("PICT1533.JPG")
ji=new JPEGImporterMBS
ji.File=g
ji.AllowDamaged=true
ji.CMYK=true // if it is cmyk
if ji.InitJPEG then
do
loop until ji.LoopJPEG<>0
ji.FinishJPEG
end if
// export it
f=SpecialFolder.Desktop.child("PICT1533 copy.JPG")
je=new JPEGExporterMBS
je.File=f
je.Quality=75
if ji.CMYK then
m=ji.PictureData
je.ExportCMYK m, ji.Width, ji.Height, ji.Width*4
else
je.Picture=ji.Picture
je.Export
end if
This class is not depending on any library! It works without QuickTime even on System 7, but as it contains everything needed this method is around 100 KB big!
Bases on libjpeg.
- 4 events
- event Error(message as string, ErrorCode as Integer)
- event GetRowData(index as Integer) as memoryblock
- event Info(message as string, msglevel as Integer, ErrorCode as Integer)
- event Warning(message as string, ErrorCode as Integer)
- 19 properties
- property data as string
- property DCTMethod as Integer
- property ErrorCode as Integer
- property ErrorMessage as string
- property EXIFData as String
- property file as folderitem
- property HorizontalResolution as Integer
- property OptimizeCoding as Boolean
- property Path as String
- property Picture as Picture
- property ProfileData as String
- property Progressive as Boolean
- property Quality as Integer
- property ResolutionUnit as Integer
- property VerticalResolution as Integer
- property WarningMessage as String
- property XMPData as String
- property YieldTicks as Integer
- property Markers(Index as Integer) as string
- shared property API as String
- 6 methods
- method Export
- method ExportCMYK(data as memoryblock, width as UInt32, height as UInt32, rowbytes as UInt32)
- method ExportGray
- method ExportGray(data as memoryblock, width as UInt32, height as UInt32, rowbytes as UInt32)
- method ExportRGB(data as memoryblock, width as UInt32, height as UInt32, rowbytes as UInt32)
- method ExportRGBwithRowDataEvent(width as UInt32, height as UInt32, rowbytes as UInt32)
- 2 shared methods
- shared method GetJPEGVersion as String
- shared method SetAPI(API as Ptr = nil)
- 3 constants
Resolution Unit
Constant | Value | Description |
---|---|---|
ResolutionUnitDotsPerCentimeter | 2 |
Dots per centimeter |
ResolutionUnitDotsPerInch | 1 |
Dots per inch |
ResolutionUnitUnknown | 0 |
Undefined |
This class has no sub classes.
Some examples using this class:
- /Images/JPEG/Apple ICC Profile to JPEG File
- /Images/JPEG/JPEG Benchmark
- /Images/JPEG/JPEG Save Grayscale Picture
- /Images/JPEG/JPEGToString example
- /Images/JPEG/PNG to JPEG with ICC Profile
- /Images/JPEG/Recompress JPEGs
- /Images/JPEG/SaveJPEG without QuickTime2
- /Images/LCMS2/Apple ICC Profile to JPEG File
- /Images/LCMS2/CMYK/CMYK Example
- /MacCF/ColorSync/Colorsync Transform to CMYK
Blog Entries
- MBS Xojo Plugins, version 20.0r7
- MBS Xojo Plugins, version 19.6pr4
- MBS Xojo Plugins, version 19.5pr7
- MBS Xojo / Real Studio Plugins, version 17.1pr1
- MBS Xojo / Real Studio Plugins, version 15.0pr11
- ICC color profiling
- MBS Xojo / Real Studio Plugins, version 14.2pr9
- MBS Real Studio Plugins, version 12.3pr3
- Making use of the WebFileUploader
- MonkeyBread Software Releases the MBS REALbasic plug-ins 8.4
The items on this page are in the following plugins: MBS Images Plugin.
JPEG2000MBS - JPEGImporterMarkerMBS

Links
MBS FileMaker Plugins