Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your feedback on a survey! Each completed response supports our community and gives you a chance to win a $25 Amazon gift card!


How can i convert texture formats?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 jor1980   Members   -  Reputation: 151

Like
0Likes
Like

Posted 28 February 2014 - 04:28 AM

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?



Sponsor:

#2 TheComet   Crossbones+   -  Reputation: 1647

Like
2Likes
Like

Posted 28 February 2014 - 11:32 AM

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


YOUR_OPINION >/dev/null

#3 Code Fox   Members   -  Reputation: 1811

Like
0Likes
Like

Posted 01 March 2014 - 10:26 AM

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


Edited by Shippou, 01 March 2014 - 10:28 AM.

Does Anyone Actually Read This ?
 


#4 TheComet   Crossbones+   -  Reputation: 1647

Like
0Likes
Like

Posted 03 March 2014 - 03:32 AM

@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.


YOUR_OPINION >/dev/null




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS