Open Source Java Image Creation Library

Hello,

Anyone have any recommendations on an open source library I can use to create Images from  user uploaded images.  I have the file upload part working but I need to take that image and create a two new ones with a default width and a height that is in proportion and then store those on a linux box.  Thanks for the suggestions!  
cgray1223Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

for_yanCommented:
You mean you want to scale the pictures?
What is the format of image files which your are uploading?
0
CEHJCommented:
Try JMagick - it's fast and you'll probably find that at least some of the dependencies are already installed:

http://javabog.dk/jmagick/old_website/www.yeo.id.au/jmagick/
0
Introduction to R

R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

Mick BarryJava DeveloperCommented:
let me know if you need help with anything specific
0
cgray1223Author Commented:
A user is uploading files of type jpg, gif and png and then I need to take those and resize them.  One a thumbnail and one a larger image.  
0
for_yanCommented:



These are some more links about resizing and preparing Thumbnails of
 jpg and other image files using Java:


http://www.velocityreviews.com/forums/t292186-java-thumbnail-resize-image-app.html

http://www.mkyong.com/java/how-to-resize-an-image-in-java/
0
Mick BarryJava DeveloperCommented:
you would either read image from stream, or read it from a the byte array read from user using ImageIO
then you can resize it using Java2D
0
cgray1223Author Commented:
Where I'm not sure is that I can go one of two routes.  I can store the uploaded file in some temp directory and create two images from it or I can convert the upload image into a byte[].  What is easier to work with?  I just need to take the incoming file and create a 200x200 and a 800x800 image from it.  Thanks for all the help!
0
Mick BarryJava DeveloperCommented:
you don't need to create a file, you can process the image directly

>  or I can convert the upload image into a byte[].

the uploaded image should already be a byte array

0
cgray1223Author Commented:
Objects,
I have the below code I want to use but instead of a file I have a InputStream inputStream = event.getFile().getInputstream(); How do I create a BufferedImage using an InputStream?  Thanks for all your help!


BufferedImage image = ImageIO.read(new File("C:\\Users\\User\\Downloads\\picture.jpg"));
0
CEHJCommented:
For InputStream 'in':


BufferedImage image = ImageIO.read(in);

Open in new window

0
Mick BarryJava DeveloperCommented:
> I have the below code I want to use but instead of a file I have a InputStream inputStream = event.getFile().getInputstream(); How do I create a BufferedImage using an InputStream?  

http://helpdesk.objects.com.au/java/how-do-i-read-an-image-from-an-input-stream

> Thanks for all your help!

no worries :)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.