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
A class for JPEG Exporting.
Example
Var g as FolderItem
Var ji as JPEGImporterMBS
Var je as JPEGExporterMBS
Var f as FolderItem
Var 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.

Resolution Unit

Constant Value Description
ResolutionUnitDotsPerCentimeter 2 Dots per centimeter
ResolutionUnitDotsPerInch 1 Dots per inch
ResolutionUnitUnknown 0 Undefined

This class has no sub classes.

Blog Entries

Release notes

Some examples using this class:

Some related classes:


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


JPEG2000MBS   -   JPEGImporterMarkerMBS


The biggest plugin in space...