Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Cropping SWT image
Cropping SWT image [message #330172] Fri, 18 July 2008 05:25 Go to next message
Eclipse UserFriend
Originally posted by: puneet82sri.yahoo.com

Hi All,
I have a application on draw2d, with different diagram. I need to save those diagram in images and then place them on msword. I am facing two problems.

1. I need to <b>save the big diagrams in parts</b> so that they can easily fit in msword page. <u>Drawing the complete draw2d figure</u> on Graphics is <u>expensive.</u>

2. Secondly we can export images only in BMP & JEPG. <b>BMP is too heavy</b> and placing JEPG bring dithering. Is there any other format to which we can save the images e.g. PNG.

Please comment

Thanks
Puneet
Re: Cropping SWT image [message #330182 is a reply to message #330172] Fri, 18 July 2008 13:02 Go to previous message
Eclipse UserFriend
Originally posted by: puneet82sri.yahoo.com

Hi All,

I have a work-around approach to achieve point 1.

AWT has apis to crop images.
1. Convert SWT image data into AWT's buffer.
2. Repeatedly crop awt buffer and convert them into swt's image data.

This approach seems to work fine. But for very big diagram I get memory exceptions. As I mentioned earlier -
<b>"Drawing the complete draw2d figure on Graphics is expensive."</b>.

Any one have an alternate, smart and efficient solution to it.

thanks
Puneet
Previous Topic:extension point schema binding
Next Topic:Signal Error
Goto Forum:
  


Current Time: Thu Apr 25 13:45:49 GMT 2024

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

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

Back to the top