Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

JPEGExporterMBS.data as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JPEG MBS Images Plugin Yes Yes Yes Yes No
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)

Feedback, Comments & Corrections

JPEGExporterMBS.DCTMethod as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JPEG MBS Images Plugin 15.0 Yes Yes Yes Yes No
Function: Which DCT/IDCT algorithm to use.
Notes:
Possible values:
-1Plugin does not change setting
0slow but accurate integer algorithm (default)
1faster, less accurate integer method
2floating-point: accurate, fast on fast Hardware
Default is Integer slow.
(Read and Write property)

Feedback, Comments & Corrections

JPEGExporterMBS.ErrorCode as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JPEG MBS Images Plugin Yes Yes Yes Yes No
Function: The error code from the Export method.
Example:
dim j as new JPEGExporterMBS

// do something

MsgBox str(j.ErrorCode)+" "+j.ErrorMessage
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)

Feedback, Comments & Corrections

JPEGExporterMBS.ErrorMessage as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JPEG MBS Images Plugin Yes Yes Yes Yes No
Function: The last error message reported.
Example:
dim j as new JPEGExporterMBS

// do something

MsgBox j.ErrorMessage
Notes: (Read and Write property)

Feedback, Comments & Corrections

JPEGExporterMBS.EXIFData as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JPEG MBS Images Plugin 10.0 Yes Yes Yes Yes No
Function: The EXIF data for this file.
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
Notes:
The export methods use this property.
(Read and Write property)

Feedback, Comments & Corrections

JPEGExporterMBS.file as folderitem
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JPEG MBS Images Plugin Yes Yes Yes Yes No
Function: The destination file.
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
Notes:
If file is nil, the destination is the data property.
(Read and Write property)

Feedback, Comments & Corrections

JPEGExporterMBS.HorizontalResolution as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JPEG MBS Images Plugin 3.2 Yes Yes Yes Yes No
Function: The horizontal resolution.
Example:
dim j as new JPEGExporterMBS

// setup 300 dpi
j.VerticalResolution = 300
j.HorizontalResolution = 300
j.ResolutionUnit = 1
Notes: (Read and Write property)

Feedback, Comments & Corrections

JPEGExporterMBS.OptimizeCoding as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JPEG MBS Images Plugin 10.0 Yes Yes Yes Yes No
Function: Whether the plugin should ask the compressor to optimize the huffman coding tables.
Example:
dim j as new JPEGExporterMBS
j.OptimizeCoding = true
Notes:
This usually provides a small percentage decrease in file size.
(Read and Write property)

Feedback, Comments & Corrections

JPEGExporterMBS.Picture as Picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JPEG MBS Images Plugin Yes Yes Yes Yes No
Function: The picture to use.
Example:
dim MyPic as Picture = LogoMBS(500)
dim j as JPEGExporterMBS // your exporter
j.picture=MyPic
Notes:
Should be a bitmap picture without alpha channel or mask.
(Read and Write property)

Feedback, Comments & Corrections

JPEGExporterMBS.ProfileData as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JPEG MBS Images Plugin 7.2 Yes Yes Yes Yes No
Function: An ICC profile to write to the file.
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
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)

Feedback, Comments & Corrections

JPEGExporterMBS.Progressive as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JPEG MBS Images Plugin Yes Yes Yes Yes No
Function: whether to make a progressive compressed image.
Example:
dim j as new JPEGExporterMBS
j.Progressive = true
Notes:
Default is true.
(Read and Write property)

Feedback, Comments & Corrections

JPEGExporterMBS.Quality as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JPEG MBS Images Plugin Yes Yes Yes Yes No
Function: The quality to use.
Example:
dim je as new JPEGExporterMBS
je.quality = 75
Notes:
Range from 0 to 100. Default is 75.
(Read and Write property)

Feedback, Comments & Corrections

JPEGExporterMBS.ResolutionUnit as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JPEG MBS Images Plugin 3.2 Yes Yes Yes Yes No
Function: The unit of the resolution properties.
Example:
dim j as new JPEGExporterMBS

// setup 300 dpi
j.VerticalResolution = 300
j.HorizontalResolution = 300
j.ResolutionUnit = 1
Notes:
Values:
0unknown
1dots per inch
2dots per cm
(Read and Write property)

Feedback, Comments & Corrections

JPEGExporterMBS.VerticalResolution as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JPEG MBS Images Plugin 3.2 Yes Yes Yes Yes No
Function: The vertical resolution.
Example:
dim j as new JPEGExporterMBS

// setup 300 dpi
j.VerticalResolution = 300
j.HorizontalResolution = 300
j.ResolutionUnit = 1
Notes: (Read and Write property)

Feedback, Comments & Corrections

JPEGExporterMBS.WarningMessage as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JPEG MBS Images Plugin 8.5 Yes Yes Yes Yes No
Function: The last warning message reported.
Example:
dim j as new JPEGExporterMBS

// do something

MsgBox j.WarningMessage
Notes: (Read and Write property)

Feedback, Comments & Corrections

JPEGExporterMBS.XMPData as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JPEG MBS Images Plugin 11.3 Yes Yes Yes Yes No
Function: The XMP data for this file.
Notes:
The export methods use this property.
(Read and Write property)

Feedback, Comments & Corrections

JPEGExporterMBS.YieldTicks as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property JPEG MBS Images Plugin 7.3 Yes Yes Yes Yes No
Function: How much time is given back to REALbasic for other ticks.
Example:
dim j as JPEGExporterMBS // your exporter

j.YieldTicks=6 // only use 1/10th of a second
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 REALbasic redraw a progressbar.
(Read and Write property)

Feedback, Comments & Corrections

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




Links
MBS Xojo Plugins