Where can I get the JPG/PNGLoader under last releases?

Problems building or running Ardor3D, questions about how to use features, etc.

Where can I get the JPG/PNGLoader under last releases?

Postby Steelplume » Thu Jul 01, 2010 7:40 pm

Hi,

It's my first post on forum :) I use Ardor3D from the last week, just to say that I am totally newbie.
Until now I am really happy, the double instead of float gives more precision on large scene :)

Anyway I am using the 0.7 snapshot version, but when I load any jpeg or png image I receive a message like
"the format .png/.jpg not supported". Debugging I noticed that the library loads only BMP/TGA/ADI/DSS loaders... so, even if PNG/JPG support is not implement out of the box :( TGA could be a better choice?
Steelplume
newcomer
 
Posts: 18
Joined: Tue Jun 29, 2010 9:46 am

Re: Where can I get the JPG/PNGLoader under last releases?

Postby jp.lorandi » Thu Jul 01, 2010 8:45 pm

PNG/JPG support is bundled with the AWT Image Loader. I use it regularily. It can also load any BufferedImage as a texture, which is the handiest way of working with CPU procedurally generated textures.

The best format usually is DDS. Both nVidia and ATI provide free converters for these.
jp.lorandi
regular
 
Posts: 123
Joined: Sun Mar 29, 2009 2:07 pm
Location: Rosario, Argentina

Re: Where can I get the JPG/PNGLoader under last releases?

Postby renanse » Thu Jul 01, 2010 9:20 pm

You can load JPG, GIF, PNG and others that awt supports by simply adding a single line to your code early in your initialization:

Code: Select all
AWTImageLoader.registerLoader();


We keep it out of the core jar for a number of reasons, so just make sure you add ardor3d-awt.jar to your app's classpath and import com.ardor3d.image.util.AWTImageLoader.

Hope that helps!
Gratitude is a mark of a noble soul and a refined character.
User avatar
renanse
Site Admin
 
Posts: 2958
Joined: Tue Oct 28, 2008 6:49 pm
Location: Austin, TX

Re: Where can I get the JPG/PNGLoader under last releases?

Postby Steelplume » Fri Jul 02, 2010 6:22 am

renanse wrote:You can load JPG, GIF, PNG and others that awt supports by simply adding a single line to your code early in your initialization:

Code: Select all
AWTImageLoader.registerLoader();


We keep it out of the core jar for a number of reasons, so just make sure you add ardor3d-awt.jar to your app's classpath and import com.ardor3d.image.util.AWTImageLoader.

Hope that helps!


Thank you! :) I read about your main scopes, specialization rather than generalization

P.S.
I also noticed why it did not find any supported loader, I had put that call in the bottom of my init code, I was thinking it was some exotic UI linkage for AWT :mrgreen: :mrgreen:
Steelplume
newcomer
 
Posts: 18
Joined: Tue Jun 29, 2010 9:46 am

Re: Where can I get the JPG/PNGLoader under last releases?

Postby shinden15 » Tue Mar 20, 2012 5:12 pm

:o

This really threw me off the track. Had to modify all collada files to load a tga tex. Good thing I've found this post. :lol:

*Must get those collada files to load jpg/png files again* :ugeek:
Got two projects due this month. Will use Ardor3D for both.
*Finish one of the projects will post in forums after I got it running on an executable JAR*

Code-Eat-Sleep-Play
shinden15
newcomer
 
Posts: 28
Joined: Thu Mar 08, 2012 4:11 am


Return to HELP!

Who is online

Users browsing this forum: No registered users and 0 guests