Jump to content

  • Log In with Google      Sign In   
  • Create Account


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: 142

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   Members   -  Reputation: 1460

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 Shippou   Members   -  Reputation: 1471

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.

 Reactions To Technologies:
1. Anything that is in the world when you’re born is normal and ordinary and is just a natural part of the way the world works.
2. Anything that's invented between when you’re fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it.
3. Anything invented after you're thirty-five is against the natural order of things.

- Douglas Adams 2002


 


#4 TheComet   Members   -  Reputation: 1460

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