I want to resize sprite (size x2). Right now, the aim is the quality over the speed.

A linear algorithme give a poor quality result, so I do some search and it seems that HQ2x is a good choise. I made a java version of HQ2x (darn what a big source ) but it was not mean to be use with alpha value. I did some modification but I still have problems. Another problem is that HQ2x create new colors.

I think HQ2x is more authentic to the original. Look at the knee caps of Scale2x and HQ2x...HQ2x has a nice gradient which is what the original picture is trying to show (as opposed to the white bit of the tail which is meant to be cartoony) whereas Scale2x has a cartoony knee cap...

I think that HQ2x is nicer too. But it has several disavantages to Scale2x :- HQ2x may not have transparency (interpolation on alpha values)- HQ2x generate color that are not in the original sprite (may be a probleme for indexed palette)

HQ2x is under the GNU Lesser General Public License by MaxSt. I really not use to licences... What should i do, if i want to provide the source code ? Only copying the header from the original source code ?

I have a set of sprites which need 2x scaling right now and I'd liek to use these tools but Scale2x doesn't work witrh alpha values - it makes them black pixels, and I don't know how to run HQ2x, the random exe I find doesn't start a GUI or anything.

It surprises me that java2d doesn't have a good filter for this kind of scaling - Bilinear looks so cloudy and and raw is too pixelated. I downloaded Paint.NET and its scaling only uses raw or bilinear which sux.

May I ask how you used Kev's Scale2x with alphas, like in the sample image you showed?

For the image, it is take from my sprite sheet editor with one of my plugins (Here's the source of the plugin for 2x scaling. It contains HQ2x and Scale2x. Both method need 2 TYPE_INT_ARGB BufferedImage as parameters)

For the image, it is take from my sprite sheet editor with one of my plugins (Here's the source of the plugin for 2x scaling. It contains HQ2x and Scale2x. Both method need 2 TYPE_INT_ARGB BufferedImage as parameters)

Thanks heaps for that code, I used the scaling methods in a little app that popped a filechooser which allowed me to choose a directory and scale-up a whole directory full of images.

You're right about the scaling working on translucent images, it seems that it just doesn't work when you try to save the image as a gif using ImageIO (it works fine when you save it as a PNG).

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org