Replacing com.sun.image.codec.jpeg

Hello,

Xith3D uses com.sun.image.codec.jpeg in a few places. In every case the code could be rewritten to use javax.imagio facilities. Is there any reason it was written that way originally?

I recently managed to build Xith3D with gcj and other free software libraries, but in order to do this I had to replace all of the com.sun.image.codec.jpeg code with javax.imageio code.

This page has a little more info on why using com.sun.* packages is a bad idea:
http://developer.classpath.org/mediation/ClasspathMigration

I would like to submit my patches to replace this code. Should I just post them in this forum?

Thanks,

AG

I’ve created a patch (issue 92) which replaces the texture handling and intruduces a new TextureLoader2. This will only use javax.imageio.ImageIO.

green, will you share the result of your work ?
I would be interested to see Xith3D run with gcj…

Yes, of course I’ll share. My goal is to make RPMs available for Fedora Core 4.

I’m finding a few small problems in our AWT and javax.imagio implementations right now which need to be sorted out. Also, the GTK+ AWT peers don’t currently support full screen mode. There will probably be other problems but whatever we find should be fixable.

I’ll post to this forum when there something to look at.

Early snapshots of my jogl, joal, etc RPMs are available here:
http://people.redhat.com/green/FC4

You are welcome to submit patches, they should go though the java.net IssueZilla system (http://xith3d.dev.java.net/).

I am guessing (hoping) that the code you are seeing was written pre-ImageIO, probably for another project then added to Xith3D.

Matthias has been developing a replacement texture loader system which will be added to Xith3D soon.

Be warned that there are differences between the two methods of reading JPEG’s. For example, this bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4881314 which has only just been fixed after a few years, has forced me to use the old Toolkit approach to reading images in other projects!!

Will.

[quote]Yes, of course I’ll share. My goal is to make RPMs available for Fedora Core 4.

Early snapshots of my jogl, joal, etc RPMs are available here:
http://people.redhat.com/green/FC4
[/quote]
Okay, thank you.

Would you think it would be possible/useful to make autopackage packages ? ( More informations on : http://www.autopackage.org ). This way, distribution-specific packages don’t have to be build.

And too would it be possible to make Mac/Windows installers ? I don’t use Mac neither Windows but I think to distribute programs it would be nice. I don’t ask you to do it by yourself but maybe I can do it on my free time.