Jump to content

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

How can i convert texture formats?

4: Adsense

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   

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   Members   

3859
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


"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

#3 Code Fox   GDNet+   

3043
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   Members   

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


"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




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.