Platforms to show: All Mac Windows Linux Cross-Platform
PaletteCalculatorMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Graphics & Pictures | MBS Picture Plugin | 8.7 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
You can create the best matching palette for a given image.
If you have several images which should share the same palette, you can draw them first on one big picture before calculating the
- 2 properties
- 10 methods
- method CountColors as Integer
- method CreatePicturePalette(Pic as picture) as Integer
- method GetIndexOfColor(col as color) as Integer
- method GetIndexOfColor(r as Integer, g as Integer, b as Integer) as Integer
- method GetNearestIndexOfColor(col as color) as Integer
- method GetNearestIndexOfColor(r as Integer, g as Integer, b as Integer) as Integer
- method Transform(mem as memoryblock, width as Integer, height as Integer) as picture
- method Transform(Pic as picture) as memoryblock
- method TransformBetterDithering(Pic as picture) as memoryblock
- method TransformFastDithering(Pic as picture) as memoryblock
This class has no sub classes.
Some examples using this class:
- /Images/GIF/Gif Write Animated
- /Images/GIF/Gif Write Animated with endless loop
- /Images/GIF/Gif Write Picture
Blog Entries
- MBS Xojo Plugins, version 20.2pr1
- MBS Xojo Plugins, version 18.5pr2
- MBS Xojo / Real Studio Plugins, version 15.4pr4
- MBS Real Studio Plugins, version 12.3pr3
Release notes
- Version 20.2
- Fixed CreatePicturePalette method in PaletteCalculatorMBS as well as transform methods to work better on 64-bit and use less memory.
- Version 18.5
- Fixed bug in PaletteCalculatorMBS.GetNearestIndexOfColor with color parameter.
The items on this page are in the following plugins: MBS Picture Plugin.
PacketSocketMBS - PCRE2CodeInfoMBS