• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Save Component(containing jpeg and JLabels) as JPEG? Is there a package for this?

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it possible to save a Component(containing jpeg and JLabels) as a JPEG? Has anyone seen a package out there that allows this by simply passing the component?
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Given a Component "this", one can create an image and write it to file by:
 
Matt Wilcko
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Joe!
One more question, any idea if I can specify dpi? Ideally the image would be 300 dpi for high quality printing.
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why didn't you just post a new topic with a link to your
previous question
 
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tied this a few years ago and could find NO way to get anything more than 72 DPI. I was using an image then using a PDF converison library to convert it to PDF. The output looked awful because it was 72 DPI. I gave up on the PDF/JPEG output. If anyone does know a way to make it greater than 72 DPI, I would be interested to hear it also.
brian
 
Matt Wilcko
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Would it be possible to create a component that is larger than screen size(2000 x 1500 for example) and then make a jpeg from that with the method above?
It wouldnt be 300 dpi, but an image that large could be converted to a 6.5" x 3" 300 dpi image. Basically the same as a digital camera, a high rez 72 dpi image.
Just have the user work on a low rez version on-screen and then from that create the very large component and save it to jpeg.
Will this even work? Im just thinking out loud.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic