Results 1 to 4 of 4
Thread: output jpeg file problem
- 11-28-2010, 06:19 PM #1
Member
- Join Date
- Jul 2010
- Posts
- 36
- Rep Power
- 0
- 11-28-2010, 06:34 PM #2
Senior Member
- Join Date
- Oct 2010
- Location
- Germany
- Posts
- 780
- Rep Power
- 4
or you are painting directly on a bufferedeimage instead of a jpanel and use drawImage in your paint/paintComponent method.Java Code:BufferedImage image = new BufferedImage(panel.getWidth(), panel.getHeight(), BufferedImage.TYPE_INT_RGB); panel.paintAll(image.createGraphics()); ImageIO.write(image, "jpg", new File("panel.jpg"));
An image can be saved with the ImageIO.write method!
- 11-28-2010, 07:34 PM #3
Member
- Join Date
- Jul 2010
- Posts
- 36
- Rep Power
- 0
Thank you eRaaaa :)
- 11-29-2010, 11:58 AM #4
Member
- Join Date
- Jul 2010
- Posts
- 36
- Rep Power
- 0
Similar Threads
-
Problem while redirecting script output to a file using java
By umapathy_sekar in forum Advanced JavaReplies: 4Last Post: 11-09-2010, 09:33 AM -
Printing JPEG file using java
By venkateshcoolmoon in forum Advanced JavaReplies: 2Last Post: 02-18-2010, 05:50 AM -
problem with output of jar file
By nishant.4545 in forum Advanced JavaReplies: 2Last Post: 07-04-2009, 04:00 PM -
how to include restart merkers in a JPEG file
By ananta_javaforums001 in forum NetworkingReplies: 0Last Post: 04-09-2009, 03:29 PM -
To open an image file such as Jpeg file using JAva Program
By itmani2020 in forum Advanced JavaReplies: 10Last Post: 07-11-2008, 09:57 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks