Platforms to show: All Mac Windows Linux Cross-Platform

Back to FolderItem class.

FolderItem.SaveAsJPEGMBS(pic as picture, quality as Integer = 80) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method JPEG MBS Images Plugin ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Saves a picture into a file using JPEG compression.
Example
dim pic as Picture = LogoMBS(500)
dim f as folderitem
f=SpecialFolder.Desktop.child("a great jpeg picture.jpg")
if f.SaveAsJPEGMBS(pic,75) then
msgbox "Picture saved."
end if

This methods saves 32bit pictures to a file using JPEG Compression. Using the parameter you can specify the quality in range between 25 and 100%

See the "SaveJPEG without QuickTime" example.

As JPEG does not support alpha channel or mask, those are ignored.
The second parameter is optional. There you can give a file position where to start writing. This way you can save several JPEGs to different file position inside one file.
Use the JPEGExporterMBS class for more options.

Some examples using this method:

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


The biggest plugin in space...