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

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?



#2 TheComet   Crossbones+   -  Reputation: 2445

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


"Windows 10 doesn't only include spyware, it is designed as spyware" -- Gaius Publius, The Big Picture RT Interview

"[...] we will access, disclose and preserve personal data, including your content (such as the content of your emails, other private communications or files in private folders), when we have a good faith belief that doing so is necessary" -- Windows 10 Privacy Statement


#3 Code Fox   GDNet+   -  Reputation: 2873

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.

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

Code_Fox_Sig.png


#4 TheComet   Crossbones+   -  Reputation: 2445

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.


"Windows 10 doesn't only include spyware, it is designed as spyware" -- Gaius Publius, The Big Picture RT Interview

"[...] we will access, disclose and preserve personal data, including your content (such as the content of your emails, other private communications or files in private folders), when we have a good faith belief that doing so is necessary" -- Windows 10 Privacy Statement





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