• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Code to create thumbnails  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to figure out how to write code that will create a thumbnail of an existing uploaded image. I know how to make a thumbnail manually, what I need is code to generate thumbnails as soon as a user uploads an image via a form. Please Help!!!
 
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anavian,
Javaranch has a naming policy which is strictly enforced. Please change your display name to conform with this policy if you wish to keep posting here. Thanks.
 
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can call external programs to generate the thumbnails from the java.lang.Runtime API.
One good image handling package is imagemagick (www.imagemagick.org)
Imagemagick also has a JNI based Java API (http://www.yeo.nu:81/jmagick/)
 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Anavian:
I am trying to figure out how to write code that will create a thumbnail of an existing uploaded image. I know how to make a thumbnail manually, what I need is code to generate thumbnails as soon as a user uploads an image via a form. Please Help!!!


hi
It is the same as manual method. Only that the image here will be dynamically loaded. We can write a servlet that returns an image after reading it in a particular image format.
classes From Graphics2D or JavaAdvancedImaging API would help serve the purpose
There are also lots of other imagedecoder classes available
prashanth
 
Paul Anavian
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the info I'll check it and let you know how it turns out.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!