Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Jpeg Load and Modification

Status
Not open for further replies.

fpgiv

Programmer
Oct 1, 2003
91
US
Hi,
I'm trying to load a jpeg image from a file, add some text to the image, and then save it through Java--again as a jpeg. I don't need to see the image anytime during this process. I've been searching online all day, and I can't find anything. Can anyone point me in the right direction?
Thanks!
 
OK, I got it to read in no problem, but I just realized that I do need to see the image that I am reading--so I can check on the modifications I've made to see if they are what I wanted to do. So, how would I either view the image once I read it, or print it to a file so I can see it?
Thanks,
 
How much swing/awt do you know ?
To display an image on screen, you need to use the Graphics2D.drawImage() method.

--------------------------------------------------
Free Database Connection Pooling Software
 
Not that much. However, what I am doing is just viewing the file in my file system after I make a change and write it to a file. This seems to work.

What I am working on now is trying to expand the area I have to work with once I read in the image. Once I read in the image, I want to add a blank area beside the original image where I can add more text, etc. Is there a simple way to do that?
 
>>>>> Is there a simple way to do that?
Yes, as I said in my first reply, obtain a Graphics object from your BufferedImage, and then utilise the methods in that object.

Sounds like you need to learn Swing if you want to do this in an "interactive" application.

--------------------------------------------------
Free Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top