|Type||Topic||Plugin||Version||macOS||Windows||Linux||Console & Web||iOS|
|class||Pictures Import and Export||MBS Images Plugin||8.7||Yes||Yes||Yes||Yes||No|
dim p as Picture = LogoMBS(500)
dim fi as FolderItem = SpecialFolder.Desktop.Child("test unoptimized.png")
if not fi.SaveAsPNGMBS(p,0) then
MsgBox "Failed to save PNG file."
dim fo as FolderItem = SpecialFolder.Desktop.Child("test optimized.png")
fo.Delete // delete if existed before
dim o as new PNGOptimizerMBS
o.YieldTicks=10 // give time for other threads
if o.Optimize then
MsgBox "OK: Saved "+str(o.BytesSaved)
OptiPNG: Advanced PNG optimization program.
Copyright (C) 2001-2008 Cosmin Truta.
OptiPNG is open-source software, and is distributed under the same licensing and warranty terms as libpng.
PNG optimization is described in detail in the PNG-Tech article "A guide to PNG optimization"
The idea of running multiple compression trials with different PNG filters and zlib parameters is inspired from the pngcrush program by Glenn Randers-Pehrson.
The idea of performing lossless image reductions is inspired from the pngrewrite program by Jason Summers.
- 5 events
- 15 properties
- property BytesSaved as Integer
- property Force as Boolean
- property full as Boolean
- property InputFile as Folderitem
- property interlace as Integer
- property KeepBackup as Boolean
- property NoBitDepthReduction as Boolean
- property NoColorTypeReduction as Boolean
- property NoIDATRecompression as Boolean
- property NoPaletteReduction as Boolean
- property OptimizationLevel as Integer
- property OutputFile as Folderitem
- property Preserve as Boolean
- property simulate as Boolean
- property YieldTicks as Integer
- method Optimize as boolean
This class has no sub classes.
Some examples which use this class:
The items on this page are in the following plugins: MBS Images Plugin.
MBS Xojo tutorial videos