Meet us at at Real World in Orlando, Florida.
Platforms to show: All Mac Windows Linux Cross-Platform
The class JPEGExporterMBS
class JPEGExporterMBS
MBS Real Studio JPEG Plugin (JPEGCompression),
class, JPEG, MBS Real Studio JPEG Plugin (JPEGCompression), class JPEGExporterMBS,
Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
Function: A class for JPEG Exporting.
Example:
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!
(REALbasic's SaveAsJPEG depends on QuickTime)
Bases on libjpeg.
Mac: Yes, Win: Yes, Linux: Yes, Console & Web: Yes, Feedback.
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
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!
(REALbasic's SaveAsJPEG depends on QuickTime)
Bases on libjpeg.
- 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)
- property data as string
- 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 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
- method Export
- method ExportCMYK(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)
This class has no sub classes.
Some examples which use this class:
- /QuickTime/Resize picture
- /LCMS2/CMYK/CMYK Example
- /LCMS/CMYK/CMYK Example
- /LargePicture/JPEG Save
- /JPEG/SaveJPEG without QuickTime2
- /JPEG/Recompress JPEGs
- /JPEG/JPEGToString example
- /JPEG/JPEG Benchmark
The items on this page are in the following plugins: MBS Real Studio JPEG Plugin.
Links
MBS Realbasic PDF Plugins - Förderverein St. Arnulf Nickenich