Re: image manipulation package?
On Mon, 19 May 2008, Dundonald wrote:
On 19 May, 21:54, viv <barousse.viv...@gmail.com> wrote:
On May 19, 10:39 pm, Dundonald <mark.dun...@gmail.com> wrote:
can anyone recommend a good image package that will allow me to add
text to certain image templates?
Did you tried java.awt.image ? I think you can use the BufferedImage
class to load your image template, and use the method createGraphics()
to get a Graphics2D instance. This object will allow you to put some
text on these images.
Vivien I've never had reason to do image manipulation so thanks for
pointing the tinned up package, I'll check it. I'll report back for
completeness.
In the meantime if any other suggestions please pass on.
Nope, that's pretty much it!
There are other image-processing libraries for java, but they're more
oriented towards dealing with all sorts of obscure file formats and doing
classic image processing like convolution etc. They aren't what you need.
The one other thing i'd point you at is javax.imageio, which does reading
and writing of image files. java.awt.image is the way to do the actual
graphics, though. You go to imageio to load your template, image to get a
Graphics object, awt to draw on it, then imageio again to write it out.
tom
--
.... which may end up with the women in your office cornering you at the
office xmas party and taking turns at jamming their bootclad feet into
your genitals. This is what is known as the Wrong Kind of Footsie. --
Lord Foom