Platforms to show: All Mac Windows Linux Cross-Platform
JPEGExporterMBS.data as string
Function:
The destination string.
Notes:
If file is nil, the compressed data is saved in this property.
The returned string has the encoding set to MacRoman. If you want to concat the string with another you should change the encoding, so both strings have the same encoding. If you don't handle that RB may convert the JPEG data to UTF8 (Unicode) which will destroy it.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | JPEG | MBS Images Plugin | Yes | Yes | Yes | Yes | All |
Notes:
If file is nil, the compressed data is saved in this property.
The returned string has the encoding set to MacRoman. If you want to concat the string with another you should change the encoding, so both strings have the same encoding. If you don't handle that RB may convert the JPEG data to UTF8 (Unicode) which will destroy it.
(Read and Write property)
JPEGExporterMBS.DCTMethod as Integer
Function:
Which DCT/IDCT algorithm to use.
Notes:
Possible values:
Default is Integer slow.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | JPEG | MBS Images Plugin | 15.0 | Yes | Yes | Yes | Yes | All |
Notes:
Possible values:
-1 | Plugin does not change setting |
0 | slow but accurate integer algorithm (default) |
1 | faster, less accurate integer method |
2 | floating-point: accurate, fast on fast Hardware |
(Read and Write property)
JPEGExporterMBS.ErrorCode as Integer
Function:
The error code from the Export method.
Example:
Notes:
The last function was successfull if ErrorCode is 0.
If the parameters are not valid, the value is set to -1.
Other values are Mac OS error codes.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | JPEG | MBS Images Plugin | Yes | Yes | Yes | Yes | All |
Example:
dim j as new JPEGExporterMBS
// do something
MsgBox str(j.ErrorCode)+" "+j.ErrorMessage
The last function was successfull if ErrorCode is 0.
If the parameters are not valid, the value is set to -1.
Other values are Mac OS error codes.
(Read and Write property)
JPEGExporterMBS.ErrorMessage as string
Function:
The last error message reported.
Example:
Notes:
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | JPEG | MBS Images Plugin | Yes | Yes | Yes | Yes | All |
Example:
dim j as new JPEGExporterMBS
// do something
MsgBox j.ErrorMessage
JPEGExporterMBS.EXIFData as String
Function:
The EXIF data for this file.
Example:
Notes:
The export methods use this property.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | JPEG | MBS Images Plugin | 10.0 | Yes | Yes | Yes | Yes | All |
Example:
// Read a picture file
dim f as FolderItem = SpecialFolder.Desktop.Child("test.jpg")
dim ji as new JPEGImporterMBS
ji.ReadExifData=true
ji.File=f
ji.Import
// Write a new picture file
dim o as FolderItem = SpecialFolder.Desktop.Child("out.jpg")
dim je as new JPEGExporterMBS
je.File=o
je.EXIFData = ji.ExifData
je.Picture = ji.Picture
je.Export
The export methods use this property.
(Read and Write property)
JPEGExporterMBS.file as folderitem
Function:
The destination file.
Example:
Notes:
If file is nil and path is "", the destination is the data property.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | JPEG | MBS Images Plugin | Yes | Yes | Yes | Yes | All |
Example:
dim p as Picture = LogoMBS(500)
'Save the scan
dim je as new JPEGExporterMBS
je.file = SpecialFolder.Desktop.Child("just a test.jpg")
je.quality = 75
je.picture = p
je.VerticalResolution = 72
je.HorizontalResolution = 72
je.ResolutionUnit = 1
je.export
If file is nil and path is "", the destination is the data property.
(Read and Write property)
JPEGExporterMBS.HorizontalResolution as Integer
Function:
The horizontal resolution.
Example:
Notes:
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | JPEG | MBS Images Plugin | 3.2 | Yes | Yes | Yes | Yes | All |
Example:
dim j as new JPEGExporterMBS
// setup 300 dpi
j.VerticalResolution = 300
j.HorizontalResolution = 300
j.ResolutionUnit = 1
JPEGExporterMBS.OptimizeCoding as Boolean
Function:
Whether the plugin should ask the compressor to optimize the huffman coding tables.
Example:
Notes:
This usually provides a small percentage decrease in file size.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | JPEG | MBS Images Plugin | 10.0 | Yes | Yes | Yes | Yes | All |
Example:
dim j as new JPEGExporterMBS
j.OptimizeCoding = true
This usually provides a small percentage decrease in file size.
(Read and Write property)
JPEGExporterMBS.Path as String
Function:
The destination file.
Example:
Notes:
If file is nil and path is "", the destination is the data property.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | JPEG | MBS Images Plugin | 19.5 | Yes | Yes | Yes | Yes | All |
Example:
Dim p As Picture = LogoMBS(500)
'Save the scan
Dim je As New JPEGExporterMBS
// using file
'je.file = SpecialFolder.Desktop.Child("just a test via file.jpg")
// using path
Dim f As folderitem = SpecialFolder.Desktop.Child("just a test via path.jpg")
Dim pa As String = f.NativePath
je.path = pa
je.quality = 75
je.picture = p
je.VerticalResolution = 72
je.HorizontalResolution = 72
je.ResolutionUnit = 1
je.export
If file is nil and path is "", the destination is the data property.
(Read and Write property)
JPEGExporterMBS.Picture as Picture
Function:
The picture to use.
Example:
Notes:
Should be a bitmap picture without alpha channel or mask.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | JPEG | MBS Images Plugin | Yes | Yes | Yes | Yes | All |
Example:
dim MyPic as Picture = LogoMBS(500)
dim j as JPEGExporterMBS // your exporter
j.picture=MyPic
Should be a bitmap picture without alpha channel or mask.
(Read and Write property)
JPEGExporterMBS.ProfileData as String
Function:
An ICC profile to write to the file.
Example:
Notes:
the string must contain the binary data of the profile. For example SaveProfileToString of the CMProfileMBS class returns such a string.
If the string is empty, no profile is written.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | JPEG | MBS Images Plugin | 7.2 | Yes | Yes | Yes | Yes | All |
Example:
dim f as FolderItem
dim j as JPEGImporterMBS
dim p as LCMS2ProfileMBS
dim e as JPEGExporterMBS
f=SpecialFolder.Desktop.Child("test2.jpg")
j=new JPEGImporterMBS
j.ReadMarkers=true // else no metadata is read at all
j.ReadProfileData=true // needed to fill ProfileData property
j.file=f
j.Import
if j.ProfileData="" then
MsgBox "no profile"
Return
end if
p=LCMS2ProfileMBS.CreatesRGBProfile
f=SpecialFolder.Desktop.Child("test3.jpg")
e=new JPEGExporterMBS
e.File=f
e.Picture=j.Picture
e.ProfileData=p.SaveProfileToString
e.Quality=75
e.Export
the string must contain the binary data of the profile. For example SaveProfileToString of the CMProfileMBS class returns such a string.
If the string is empty, no profile is written.
(Read and Write property)
JPEGExporterMBS.Progressive as Boolean
Function:
whether to make a progressive compressed image.
Example:
Notes:
Default is true.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | JPEG | MBS Images Plugin | Yes | Yes | Yes | Yes | All |
Example:
dim j as new JPEGExporterMBS
j.Progressive = true
Default is true.
(Read and Write property)
JPEGExporterMBS.Quality as Integer
Function:
The quality to use.
Example:
Notes:
Range from 0 to 100. Default is 75.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | JPEG | MBS Images Plugin | Yes | Yes | Yes | Yes | All |
Example:
dim je as new JPEGExporterMBS
je.quality = 75
Range from 0 to 100. Default is 75.
(Read and Write property)
JPEGExporterMBS.ResolutionUnit as Integer
Function:
The unit of the resolution properties.
Example:
Notes:
Values:
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | JPEG | MBS Images Plugin | 3.2 | Yes | Yes | Yes | Yes | All |
Example:
dim j as new JPEGExporterMBS
// setup 300 dpi
j.VerticalResolution = 300
j.HorizontalResolution = 300
j.ResolutionUnit = 1
Values:
0 | unknown |
1 | dots per inch |
2 | dots per cm |
JPEGExporterMBS.VerticalResolution as Integer
Function:
The vertical resolution.
Example:
Notes:
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | JPEG | MBS Images Plugin | 3.2 | Yes | Yes | Yes | Yes | All |
Example:
dim j as new JPEGExporterMBS
// setup 300 dpi
j.VerticalResolution = 300
j.HorizontalResolution = 300
j.ResolutionUnit = 1
JPEGExporterMBS.WarningMessage as String
Function:
The last warning message reported.
Example:
Notes:
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | JPEG | MBS Images Plugin | 8.5 | Yes | Yes | Yes | Yes | All |
Example:
dim j as new JPEGExporterMBS
// do something
MsgBox j.WarningMessage
JPEGExporterMBS.XMPData as String
Function:
The XMP data for this file.
Notes:
The export methods use this property.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | JPEG | MBS Images Plugin | 11.3 | Yes | Yes | Yes | Yes | All |
Notes:
The export methods use this property.
(Read and Write property)
JPEGExporterMBS.YieldTicks as Integer
Function:
How much time is given back to Xojo for other ticks.
Example:
Notes:
If value is greater than zero, the application will yield to another RB thread after the given number of ticks have passed. 60 ticks are one second. Using a small value can slow down processing a lot while a big value keeps your application not responding to mouse clicks.
If you use this property with e.g. 6 as the value, you may also want to use this method in a thread so you can handle mouse events or let Xojo redraw a progressbar.
(Read and Write property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | JPEG | MBS Images Plugin | 7.3 | Yes | Yes | Yes | Yes | All |
Example:
dim j as JPEGExporterMBS // your exporter
j.YieldTicks=6 // only use 1/10th of a second
If value is greater than zero, the application will yield to another RB thread after the given number of ticks have passed. 60 ticks are one second. Using a small value can slow down processing a lot while a big value keeps your application not responding to mouse clicks.
If you use this property with e.g. 6 as the value, you may also want to use this method in a thread so you can handle mouse events or let Xojo redraw a progressbar.
(Read and Write property)
The items on this page are in the following plugins: MBS Images Plugin.

Links
MBS Xojo Chart Plugins