Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » saving browser image at 300 dpi
saving browser image at 300 dpi [message #465060] Mon, 05 December 2005 05:41 Go to next message
Chris Tomlinson is currently offline Chris TomlinsonFriend
Messages: 25
Registered: July 2009
Junior Member
I suspect that what I would like to do isn't really feasible in
Eclipse/SWT; however,

I create an html page dynamically that is rendered very nicely by
org.eclipse.swt.browser.Browser. What I need to do is save the page as
an image at 300 dpi rather than the display.getDPI() which is 72 or 96.
I've tried various approaches including writing the image out at display
resolution and then resampling with ImageMagick and some java.awt tools
all of which produce thoroughly icky results.

I looked at the org.eclipse.swt.graphics.Transform and get nowhere since
I can't see how to associate a Transform with the Browser (which I
assunme somewhere along the line is involved with a GC). I thought that
perhaps I could use a scaling transform so that when the Browser renders
it would be on to an effective area equivalent to 8.5" x 11" at 300 dpi
(i.e., 2550 x 3300).

If anyone has some thoughts on how to approach the problem or knows that
it just isn't possible within SWT then I'd very much appreciate the
feedback.

I'd also add that the JFrame html capability isn't able to handle the
fonts that I'm working with whereas the SWT Browser (3.1.1 on Mac OX X
10.4.3) is. Otherwise I'd have a usable awt based solution.

Thanks,
Chris
Re: saving browser image at 300 dpi [message #466138 is a reply to message #465060] Tue, 03 January 2006 16:01 Go to previous message
Eclipse UserFriend
Originally posted by: stefan.helm1.lycos.de

Chris Tomlinson schrieb:
> ...
> I've tried various approaches including writing the image out at display
> resolution and then resampling with ImageMagick and some java.awt tools
> all of which produce thoroughly icky results.
> ...


Resampling is not the best way to enlarge screenshots. It's good for
pictures but not for text. If there is a "resize" function in
ImageMagick, try this.
Previous Topic:StyledText with right-alignment?
Next Topic:Subclassing a viewform to be able to set controls to bottom left/center/right
Goto Forum:
  


Current Time: Thu Apr 18 02:55:33 GMT 2024

Powered by FUDForum. Page generated in 0.02206 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top