• Post Reply Bookmark Topic Watch Topic
  • New Topic

Converting JPEG images to HPGL  RSS feed

 
rahul shandy
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
 
Norm Radder
Ranch Foreman
Posts: 2240
28
  • 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:
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • 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: 42972
73
  • 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!