I have created JAVA app that uses GifSequenceWriter class for creating animated GIF from PNG sequence but I noticed that gif quality is pretty bad, so I would like to know if there is some option to set the maximum quality which is 256 colors for the output gif as it seems that at the moment (by default) it uses like 128 color only by default at best (or even less!) which is very bad and almost unusable (shadows look terribly with all that color bending for example, no fine detail preserved etc.).
I tested creating the same PNG sequence in separate GIF making tool (a small Windows application) and the output gif is - compared to output from GifSequenceWriter - very very nice (shadows are preserved with all the fine detail, almost invisible color bending etc.) so I guess there most probably should be some kind of IIOMetadataNode .setAttribute() value inside GifSequenceWriter class dealing with the image output quality but I was not able identify it myself...
Or maybe it should be some attribute from imageWriteParam? I searched a bit more and it seems that the actual "quality" parameter - at least for JPEG images - can be set via imageWriteParam.setCompressionQuality(float someFloatValueHere) but when I try that it throw exceptions cos I guess there is no compression quality parameter for GIF...or is it?
Any guess anyone how to solve this issue?
BTW yes I have searched internet - no luck (I cannot even find any list of .setAttribute() options/values anywhere, strange, isn't it?)
EDIT So after reading link with attribute values provided by @Marco13 I have implemented this code part into GifSequenceWriter:
IIOMetadataNode localColorTableNode = getNode(root, "LocalColorTable");
localColorTableNode.setAttribute("sizeOfLocalColorTable", "256");
localColorTableNode.setAttribute("sortFlag", "FALSE");
IIOMetadataNode colorTableEntryNode = getNode(localColorTableNode, "ColorTableEntry");
colorTableEntryNode.setAttribute("index", someIntA);
colorTableEntryNode.setAttribute("red", someIntB);
colorTableEntryNode.setAttribute("green", someIntC);
colorTableEntryNode.setAttribute("blue", someIntD);
But I have no clue what kind of someIntA/someIntB/someIntC/someIntD int values should I add - any guess anyone, am I going the right direction or what? I kind of feel I may be on the right spot (just maybe!) but I think I need a small kick or something...maybe I do not understand something right here and I need some explanation...or just pure right away solution for those int values...? :)