Skip to content

Commit

Permalink
Release 0.4.2 !
Browse files Browse the repository at this point in the history
  • Loading branch information
tommyettinger committed Oct 7, 2023
1 parent cfa0cd4 commit 35c6770
Show file tree
Hide file tree
Showing 41 changed files with 1,269 additions and 3,293 deletions.
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void writeGif() {
// match. The other file-writing classes don't do this; PNG8 doesn't currently support a palette per-frame,
// while AnimatedPNG doesn't restrict colors to a palette. See Dithering Algorithms below for visual things
// to be aware of and choices you can make.
// You can also use FastGif in place of AnimatedGif if you don't target GWT; it may be a little faster.
// You can also use FastGif in place of AnimatedGif; it may be a little faster, but might not have great color quality.
AnimatedGif gif = new AnimatedGif();
// you can write to a FileHandle or an OutputStream; here, the file will be written in the current directory.
// here, pixmaps is usually an Array of Pixmap for any of the animated image types.
Expand All @@ -40,10 +40,9 @@ public void writeGif() {
```

The above code uses AnimatedGif, but could also use AnimatedPNG or PNG8 to write to an animated PNG (with full-color or
palette-based color, respectively). The FastGif, FastAPNG, and FastPNG8 options are also out there if you don't target
GWT, and they tend to be a little faster to run but produce larger files. There's also FastPNG, which is a replacement
for PixmapIO.PNG, and does tend to be faster than it as well. **None of the "Fast" image writers support flipping an
image vertically**, but all the non-"Fast" writers do support this; this may affect your choice.
palette-based color, respectively). The FastGif, and FastPNG8 options are also out there, and they tend to be a little
faster to run but produce larger files. There's also FastPNG, which is a replacement for PixmapIO.PNG, and does tend to
be faster than it as well.

If you are writing an image with a palette, such as a GIF or an indexed-mode PNG (called PNG8 here), the palette is
limited to using at most 255 opaque colors, plus one fully-transparent color. To adequately reduce an image to a smaller
Expand All @@ -69,7 +68,7 @@ A typical Gradle dependency on anim8 looks like this (in the core module's depen
dependencies {
//... other dependencies are here, like libGDX 1.9.11 or higher
// libGDX 1.11.0 is recommended currently, but versions as old as 1.9.11 work.
api "com.github.tommyettinger:anim8-gdx:0.4.1"
api "com.github.tommyettinger:anim8-gdx:0.4.2"
}
```

Expand All @@ -78,9 +77,9 @@ You can also get a specific commit using JitPack, by following the instructions
commit, unless you are experiencing problems with one in particular.)

A .gwt.xml file is present in the sources jar, and because GWT needs it, you can depend on the sources jar with
`implementation "com.github.tommyettinger:anim8-gdx:0.4.1:sources"`. The PNG-related code isn't available on GWT
`implementation "com.github.tommyettinger:anim8-gdx:0.4.2:sources"`. The PNG-related code isn't available on GWT
because it needs `java.util.zip`, which is unavailable there, but PaletteReducer and AnimatedGif should both work,
as should QualityPalette. None of the "Fast" classes will work on GWT.
as should QualityPalette. The classes `FastGif` and `FastPalette` should work on GWT, but no other "Fast" classes will.
The GWT inherits line, which is needed in `GdxDefinition.gwt.xml` if no dependencies already have it, is:
```xml
<inherits name="com.github.tommyettinger.anim8" />
Expand All @@ -89,8 +88,7 @@ The GWT inherits line, which is needed in `GdxDefinition.gwt.xml` if no dependen
# Dithering Algorithms
You have a choice between several dithering algorithms if you write to GIF or PNG8; you can also avoid choosing one
entirely by using AnimatedPNG (it can use full color) or libGDX's PixmapIO.PNG (which isn't animated and has a
slightly different API). You could also use one of their alternatives, FastAPNG or FastPNG, which tend to write larger
files but do so more quickly.
slightly different API). You could also use FastPNG, which tend to write larger files but do so more quickly.

- NONE
- No dither. Solid blocks of color only. Often looks bad unless the original image had few colors.
Expand Down Expand Up @@ -308,7 +306,7 @@ Original (full-color):

![](src/test/resources/Mona_Lisa.jpg)

Wren:
Wren (the current default):

![](samples/Mona_Lisa-PNG8-Wren-DB8.png)

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
gradlePluginPortal()
}
dependencies {
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.22.0'
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.25.3'
}
}

Expand Down
10 changes: 6 additions & 4 deletions docs/apidocs/allclasses-index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>All Classes and Interfaces (anim8-gdx 0.4.1 API)</title>
<title>All Classes and Interfaces (anim8-gdx 0.4.2 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="description" content="class index">
Expand Down Expand Up @@ -34,6 +34,7 @@
<li><a href="com/github/tommyettinger/anim8/package-summary.html">Package</a></li>
<li>Class</li>
<li><a href="overview-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-all.html">Index</a></li>
<li><a href="help-doc.html#all-classes">Help</a></li>
</ul>
Expand Down Expand Up @@ -79,16 +80,17 @@ <h1 title="All Classes and Interfaces" class="title">All Classes and Interfaces<
<div class="block">Represents a choice of dithering algorithm to apply when writing a high-color image with a color-limited format.</div>
</div>
<div class="col-first odd-row-color all-classes-table all-classes-table-tab2"><a href="com/github/tommyettinger/anim8/FastAPNG.html" title="class in com.github.tommyettinger.anim8">FastAPNG</a></div>
<div class="col-last odd-row-color all-classes-table all-classes-table-tab2">
<div class="block">Full-color animated PNG encoder with compression.</div>
<div class="col-last odd-row-color all-classes-table all-classes-table-tab2">Deprecated.
<div class="deprecation-comment">Use <a href="com/github/tommyettinger/anim8/AnimatedPNG.html" title="class in com.github.tommyettinger.anim8"><code>AnimatedPNG</code></a> instead.</div>
</div>
<div class="col-first even-row-color all-classes-table all-classes-table-tab2"><a href="com/github/tommyettinger/anim8/FastGif.html" title="class in com.github.tommyettinger.anim8">FastGif</a></div>
<div class="col-last even-row-color all-classes-table all-classes-table-tab2">
<div class="block">GIF encoder using standard LZW compression; can write animated and non-animated GIF images.</div>
</div>
<div class="col-first odd-row-color all-classes-table all-classes-table-tab2"><a href="com/github/tommyettinger/anim8/FastPalette.html" title="class in com.github.tommyettinger.anim8">FastPalette</a></div>
<div class="col-last odd-row-color all-classes-table all-classes-table-tab2">
<div class="block">A GWT-incompatible, optimized replacement for <a href="com/github/tommyettinger/anim8/PaletteReducer.html" title="class in com.github.tommyettinger.anim8"><code>PaletteReducer</code></a>.</div>
<div class="block">This is just like <a href="com/github/tommyettinger/anim8/PaletteReducer.html" title="class in com.github.tommyettinger.anim8"><code>PaletteReducer</code></a>, except that it uses a higher-quality, slower color difference calculation
when creating a palette.</div>
</div>
<div class="col-first even-row-color all-classes-table all-classes-table-tab2"><a href="com/github/tommyettinger/anim8/FastPNG.html" title="class in com.github.tommyettinger.anim8">FastPNG</a></div>
<div class="col-last even-row-color all-classes-table all-classes-table-tab2">
Expand Down
3 changes: 2 additions & 1 deletion docs/apidocs/allpackages-index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>All Packages (anim8-gdx 0.4.1 API)</title>
<title>All Packages (anim8-gdx 0.4.2 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="description" content="package index">
Expand Down Expand Up @@ -30,6 +30,7 @@
<li><a href="com/github/tommyettinger/anim8/package-summary.html">Package</a></li>
<li>Class</li>
<li><a href="overview-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-all.html">Index</a></li>
<li><a href="help-doc.html#all-packages">Help</a></li>
</ul>
Expand Down
Loading

0 comments on commit 35c6770

Please sign in to comment.