Skip to content

Releases: tommyettinger/anim8-gdx

0.4.2 "Cleanse Your Palette"

07 Oct 06:28
Compare
Choose a tag to compare

This release mostly revamps the PaletteReducer-related classes, such as FastPalette and QualityPalette, to be much simpler, and makes the FastSomething classes (like FastGif and FastPNG8) almost only differ by using FastPalette as their default. This allows the FastGif and FastPalette classes to be used on GWT, though they aren't actually much faster now (they may look different with some palettes, which could be useful).

FastPalette mostly differs in its color difference metric now, which is about the same as what PaletteReducer used before. Similarly, QualityPalette uses a better color difference metric, and PaletteReducer uses something similar but with some calculations done beforehand and cached. PaletteReducer and QualityPalette tend to perform similarly, but so does FastPalette, so the appearance may be all that sets them apart. This updates the WREN dither, changing how it clamps diffused error so that large flat areas are less common. It also updates LOAF, using a generally-better version that I had been testing in another repo (ColorWeaver) for a while. A few other dither algorithms may have changed.

I think this is generally a nice set of improvements; I hope you agree!

0.4.1 "Wren Free"

17 Sep 06:59
Compare
Choose a tag to compare

This release mostly adds the new WREN dither algorithm, a mix of error-diffusion, the R2 sequence pattern, and blue noise that would make Dr. Frankenstein cry tears of joy. WREN is almost as good at preserving hue as the closely-related WOVEN, but is much better at avoiding "flatness" where there should be a gradient of shading. Like WOVEN, it works especially well with small, mixed-color palettes like the DB8 palette in the README.md previews, and still works great with larger palettes. WREN is the current default; it just in general does better than NEUE did on more input images. NEUE may still do better on black-and-white-only palettes, or some other situations like that, because it doesn't treat the 3 RGB channels separately.

The other change in here is not an API change, but still may be noticeable: The lightness curve, which determines how a given float between 0.0 and 1.0 representing lightness gets converted to actual pixel colors, has been slightly adjusted and should be much closer to how it (probably) should be. It's also much easier to think about and potentially port to shader code, because it no longer uses as many conditionals or other code that changes the curve in confusing ways -- actually, the two functions are now equivalent to Math.pow(3.0/2.0) and Math.pow(2.0/3.0).

PaletteReducer.colorsFrom(Pixmap) is also a possibly-convenient new feature that gets the most frequently-encountered colors in a Pixmap (typically up to 256) and returns them as an array of RGBA8888 ints (like PaletteReducer.exact(int[]) can use. This may be handy for loading a palette from a user-provided image.

Considering I had a fever for some of the development here, I'm pretty happy with it! Enjoy!

0.4.0 "Lo-Fi Dithers to Study and Relax To"

09 Jun 05:39
Compare
Choose a tag to compare

This release adds a new dither, LOAF, and makes small adjustments to DODGY (added earlier, in 0.3.15). This has one breaking API change (barely): the removal of an undocumented public field, reverseMap in PaletteReducer, because it was only used in PATTERN dither and wasn't even helpful there. As for LOAF, it's a low-fidelity dither that typically only mixes two colors per 2x2 pixel area, though if the original area had 3 or 4 very different colors in that area, it could use up to 4 colors. LOAF tends to look much more like a hand-drawn pixel art dither than the others here, though it may look too simplistic to seem made by a human. It looks good when dithering pixel art, and not very good for high-detail images like paintings or photos. DODGY had very subtle changes, but it tends to look smoother/less-noisy now and has fewer repetitive artifacts, at the expense of not being quite as accurate at matching hue (still better than NEUE, but worse than WOVEN).

Good luck on your animating, image-writing, dithering adventures!

0.3.15 "Dodge This"

03 May 02:05
Compare
Choose a tag to compare

This release adds a new dither algorithm, DODGY, which mixes attributes of NEUE and WOVEN, and usually looks rather good. It also adds QualityPalette, which is a subclass of PaletteReducer that changes its color difference function to a usually-more-accurate, generally-slower version. Code can choose whether it wants the greatest compatibility and close-to-the-best speed (PaletteReducer), to lose GWT compatibility and maybe gain some speed (FastPalette), or to keep compatibility, give up speed, and potentially gain image quality (QualityPalette).

Also, because I forgot to make a complete GitHub release for 0.3.13 or 0.3.14, here are some notes for those:

0.3.13 brings back compatibility with Java 7, just in time for Java 20 to no longer support it. Supporting Java 7 is important for RoboVM right now, which is stuck in the distant past with its time machine broken. Most of the work in this release was to add "Fast" variants on each file type (plus non-animated PNG, in the new FastPNG class), which give up GWT compatibility and also the ability to flip the output, but may read and write files faster by using NIO Buffers.

0.3.14 makes some adjustments to BLUE_NOISE and ROBERTS dither, but doesn't do much else. Those two should look better, though. It does have some improved handling for non-RGB/RGBA inputs to FastPalette.

0.3.12 "Web Wuv"

14 Jan 00:23
Compare
Choose a tag to compare

This release pretty much only exists to improve GWT support -- earlier releases didn't use a package/namespace/folder for their .gwt.xml files, and this can cause problems in many GWT projects. Now the GWT inherits line is:

<inherits name="com.github.tommyettinger.anim8" />

Other than the version, almost nothing else has changed. There's a new experimental dithering option, "Igneous", in PaletteReducer, but it isn't a complete Dithered.DitherAlgorithm like the others. That's all, though!

0.3.11 "From The Same Cloth"

05 Nov 08:28
Compare
Choose a tag to compare

This release adds a new dither algorithm (WOVEN), updates another (ROBERTS), and doesn't do much else. If you didn't use ROBERTS before and don't want to try WOVEN, this release won't be needed for you; otherwise, WOVEN can look quite good sometimes, and I feel that ROBERTS is better as well.

0.3.10 "From Blue To Violet"

04 Oct 02:42
Compare
Choose a tag to compare

This release has several significant changes! There's a new dither algorithm (ROBERTS), simplified and improved GRADIENT_NOISE, a change to the default palette (back to DawnBringer's Aurora), and a change to how the threshold is calculated when you call PaletteReducer.analyze(). The last two of these can change what existing code will produce, so be advised that you may need to make some changes.

The palette change affects PaletteReducer objects created with no palette, with an invalid palette, or that had setDefaultPalette() called on them; Aurora was used in the earliest versions of the library, but I tried to increase yellow coverage by switching to a randomly distributed palette, Haltonic. Unfortunately, Haltonic was probably too random, and couldn't handle smooth gradients well at all because it jumped around between hues as it went up or down in lightness. You can still use Haltonic as a palette by passing it to PaletteReducer's constructor or to PaletteReducer.exact(), and it is available as a constant array in PaletteReducer.

The threshold change could be trickier, and you might need to raise or lower the threshold from the default 100 when you call analyze(). The threshold is automatically adjusted based on the limit for how many colors the palette can use; to try to maximize color coverage, PaletteReducer lowers the threshold to allow more colors in when the limit is larger. The threshold is hard to evaluate for all images equally, and it's a good idea to try and see which of 50, 100, and 200 looks best to you when the palette matters.

Hopefully this release will result in some nicer looking palette reductions and animations. Good luck.

Oh yeah, and happy birthday, Violeta!

0.3.9 "Blue In The Face"

15 Sep 05:20
Compare
Choose a tag to compare

This release adjusts BLUE_NOISE dither (like the previous release), but also changes the default palette from HALTONIC (made by a program) to AURORA (made by DawnBringer). There are also some small tweaks to defaults for thresholds on PaletteReducer.analyze() and related methods. BLUE_NOISE dither is now more subtle and keeps flat areas in input images more reliably; raising dither strength can reduce the flatness if desired. NEUE remains a great choice for realistic images and almost anything with smooth gradients, but BLUE_NOISE is targeted differently at pixel art and animations in particular.

0.3.8 "Blue Noister Cult"

07 Sep 02:42
Compare
Choose a tag to compare

This release only changes the BLUE_NOISE dither, making it have fewer (or no) scaly artifacts while keeping its strong performance on animations. This dither mode now works especially well on pixel art; isonomicon now has much higher-quality GIFs compared to when it used NEUE before. Nothing else changed, so if you're happy with your current dithering, there's no real reason to update, but if you want less-artifact-laden animations, this might be something to consider.

0.3.7 "Simple Silky Smooth Spaces"

26 May 01:25
Compare
Choose a tag to compare

This release is mostly concerned with palette analysis, including with analyze(), exact(), and the new analyzeHueWise(). Palettes are expected to change with analysis, and dithers are expected to change just a little with all of those methods. Now we use the simplest possible color difference comparison: squared Euclidean distance in RGB space. Somehow, this seems to work quite well. Several small palettes that were unusable before are very usable now; DawnBringer's DB8 palette, with just 8 colors (and transparent) is able to dither many images quite well. This is an 8-color image. I think, judging by what testing I have done, the new metric should work well, but if it doesn't, you can subclass PaletteReducer (potentially anonymously) and override the differenceMatch(), differenceAnalyzing(), and/or differenceHW() methods.