How can i convert texture formats?

Started by
2 comments, last by TheComet 10 years, 1 month ago

Hi, i am building a texture importer in java. I need to convert the textures imported by the user to some dds types.

I was seraching for an api that allows me to do it, i was thinking in use jmonkey or jogl, but in any of them i found a way to convert one given texture to another desired dds format.

Could someone tell me a way or an api to do it?

Advertisement

I'm in no way a whizz in Java, but maybe this will help you:

http://stackoverflow.com/questions/14893094/java-library-for-reading-and-writing-dds-textures

"I would try to find halo source code by bungie best fps engine ever created, u see why call of duty loses speed due to its detail." -- GettingNifty

Here is a detailed look at BufferedImage and ImageIO

Load image

http://docs.oracle.com/javase/tutorial/2d/images/loadimage.html

Save image

http://docs.oracle.com/javase/tutorial/2d/images/saveimage.html

Code example

http://www.mkyong.com/java/convert-png-to-jpeg-image-file-in-java

I cannot remember the books I've read any more than the meals I have eaten; even so, they have made me.

~ Ralph Waldo Emerson

@Shippou - OP is looking for DDS support. Java2D's ImageIO doesn't support DDS texture formats. From the link you posted:

Image I/O has built-in support for GIF, PNG, JPEG, BMP, and WBMP. Image I/O is also extensible so that developers or administrators can "plug-in" support for additional formats. For example, plug-ins for TIFF and JPEG 2000 are separately available.

I did a quick search for a DDS plugin for ImageIO, but I couldn't find one.

"I would try to find halo source code by bungie best fps engine ever created, u see why call of duty loses speed due to its detail." -- GettingNifty

This topic is closed to new replies.

Advertisement