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
Function: A class for JPEG Exporting.
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
Notes:
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.

Feedback, Comments & Corrections

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:

Blog Entries


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


JPEG2000MBS   -   JPEGImporterMarkerMBS

The biggest plugin in space...




Links
MBS FileMaker Plugins

Start Chat