Posted By:
colin_molter
Posted On:
Monday, June 2, 2003 09:12 AM
I've developped a java platform which run well under windows. But under linux, I got a ClassCastException problem when i want to save a component as a JPEG. Here follows the line of code : BufferedImage bi = (BufferedImage)comp.createImage(20,20); Graphics2D big = (Graphics2D) bi.getGraphics(); comp.paint(big); FileOutputStream out = new FileOutputStream(fileToSave); JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out); encoder.encode(bi); The problem comes when i try to encode the image ... ??? thanks colin
More>>
I've developped a java platform which run well under windows.
But under linux, I got a ClassCastException problem when i want to save a component as a JPEG.
Here follows the line of code :
BufferedImage bi = (BufferedImage)comp.createImage(20,20);
Graphics2D big = (Graphics2D) bi.getGraphics();
comp.paint(big);
FileOutputStream out = new FileOutputStream(fileToSave);
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
encoder.encode(bi);
The problem comes when i try to encode the image ...
???
thanks colin
<<Less