Platforms to show: All Mac Windows Linux Cross-Platform

Back to PNGOptimizerMBS class.

PNGOptimizerMBS.BytesSaved as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Pictures Import and Export MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
After the optimization this property shows how many bytes were saved.

(Read and Write property)

Some examples using this property:

PNGOptimizerMBS.Debug as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Pictures Import and Export MBS Images Plugin 18.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Enables debug output.

(Read and Write property)

PNGOptimizerMBS.Fix as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Pictures Import and Export MBS Images Plugin 18.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Enable error recovery.

(Read and Write property)

PNGOptimizerMBS.Force as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Pictures Import and Export MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Enforce writing of a new output file.

If the input image has a digital signature, the library will not optimize the file unless force=true.
(Read and Write property)

PNGOptimizerMBS.full as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Pictures Import and Export MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether to produce a full report on IDAT (might reduce speed).

(Read and Write property)

PNGOptimizerMBS.InputFile as FolderItem

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Pictures Import and Export MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The file to process.

(Read and Write property)

PNGOptimizerMBS.interlace as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Pictures Import and Export MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The interlace type (0-1).

Set by default to -1 for undefined.
(Read and Write property)

PNGOptimizerMBS.KeepBackup as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Pictures Import and Export MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether to keep a backup of the modified files.

If the file exists and KeepBackup=false an error is reported. If you set KeepBackup=True the old file is renamed.
(Read and Write property)

PNGOptimizerMBS.NoBitDepthReduction as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Pictures Import and Export MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether to not do a bit depth reduction.

Reducing the bit depth of the image data can reduce the file size.
(Read and Write property)

PNGOptimizerMBS.NoColorTypeReduction as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Pictures Import and Export MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether to not do a color type reduction.

If your PNG file has only 256 colors in use, the optimizer can use a color palette to save space.
(Read and Write property)

Some examples using this property:

PNGOptimizerMBS.NoIDATRecompression as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Pictures Import and Export MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether to not recompress the image data.

(Read and Write property)

PNGOptimizerMBS.NoPaletteReduction as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Pictures Import and Export MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether to not reduce the palette.

If not all colors are used, the palette can be reduced in its size.
(Read and Write property)

PNGOptimizerMBS.OptimizationLevel as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Pictures Import and Export MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The optimization level.

A value between 0 and 7.
Default is 2.
(Read and Write property)

Some examples using this property:

PNGOptimizerMBS.OutputFile as FolderItem

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Pictures Import and Export MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The output file.

(Read and Write property)

PNGOptimizerMBS.Overwrite as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Pictures Import and Export MBS Images Plugin 18.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Overwrite existing files.

(Read and Write property)

PNGOptimizerMBS.Preserve as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Pictures Import and Export MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether to preserve file attributes if possible.

(Read and Write property)

PNGOptimizerMBS.Quiet as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Pictures Import and Export MBS Images Plugin 18.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Run in quiet mode.

(Read and Write property)

PNGOptimizerMBS.simulate as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Pictures Import and Export MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether the optimization runs only in simulation mode.

No file is written in simulation mode.
(Read and Write property)

PNGOptimizerMBS.Snip as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Pictures Import and Export MBS Images Plugin 18.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Cut one image out of multi-image or animation files.

(Read and Write property)

PNGOptimizerMBS.StripAll as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Pictures Import and Export MBS Images Plugin 18.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Strip metadata objects .

(Read and Write property)

PNGOptimizerMBS.Verbose as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Pictures Import and Export MBS Images Plugin 18.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Run in verbose mode / show copyright and version info.

(Read and Write property)

PNGOptimizerMBS.YieldTicks as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Pictures Import and Export MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
How much time is given back to Xojo for other ticks.
Example
dim p as new PNGOptimizerMBS
p.YieldTicks=6 // only use 1/10th of a second

If value is greater than zero, the application will yield to another RB thread after the given number of ticks have passed. 60 ticks are one second. Using a small value can slow down processing a lot while a big value keeps your application not responding to mouse clicks.
If you use this property with e.g. 6 as the value, you may also want to use this method in a thread so you can handle mouse events or let Xojo redraw a progressbar.
(Read and Write property)

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


The biggest plugin in space...