Dycey
Dycey

Reputation: 4705

How do I convert a InputStream to BufferedImage in Java/Groovy?

Yes, I'm that stupid. I'm trying to stick some groovy code together from various cookbook recipes, and I can't get from an InputStream to BufferedImage in Java/Groovy. Google is not being my friend at present.

Upvotes: 31

Views: 43450

Answers (1)

Gans
Gans

Reputation: 1020

BufferedImage imBuff = ImageIO.read(object.getInputStream());

Should work...

Upvotes: 92

Related Questions