• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to create a buffered image..........  RSS feed

 
sumukha kris
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to create a buffered image and how does it help?
Please help me with the code .....

Thanks & regards,
 
Rob Spoor
Sheriff
Posts: 21048
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

You can change the type to one of the other constants in the BufferedImage class, like TYPE_4BYTE_ABGR, if that is more appropriate for you, but if you're just starting this will do.
 
sumukha kris
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you so much .I could do it .
Now i have declared buffered image outside the method globally and i need to draw a rectangle within a method using the instance of buffered so how to create instance of it ?

Thanks in Advanace,
Regards,
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello "sumukha"-

On your way in you may have missed that we have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name, and not be obviously fictitious. Since yours does not conform with it, please take a moment to change it, which you can do right here.

As to your question, the code shown above creates an instance of BufferedImage, so I'm not sure what else you're looking for. You can draw rectangles on it using the Graphics.drawRect method.
 
sumukha kris
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you so much i'm able to create it .
Thanks once again.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!