This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Converting JPEG images to HPGL  RSS feed

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

Can somebody please let me know how-to convert JPEG image to HPGL (or other type) of images?

Thanks in advance,
Rahul
 
Master Rancher
Posts: 3276
33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Load an Image from the jpeg file and then use the appropriate class to output the type of file you want.
Some samples:
 
Rancher
Posts: 42975
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Conversion to HPGL is not possible, since that is a vector format while JPEG is a bitmap format.

Using the javax.imageio.ImageIO class you can read and write JPEG, BMP and PNG, and there are extensions for GIF and TIFF available on the net. Are you interested in any other format in particular?
[ September 02, 2008: Message edited by: Ulf Dittmer ]
 
rahul shandy
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Our JPEG images, when scaled, becomes distorted. so, the option comes out to be one of the vector images (HPGL), which apparantely will not distort when scaling to greater sizes.
Is there any other option apart from HPGL, that can solve this problem?
 
Ulf Dittmer
Rancher
Posts: 42975
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Correct - vector images can be scaled without loss of quality. But you can't convert bitmap images to vector images, only the other way around. Unless you can find a way to generate the image as a vector image to begin with, there's no way to do what you're asking.
 
rahul shandy
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the info - folks!!
I was thinking Java adv API might help
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!