Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Re: SWT imaging API?


Sorry it took a while to get to this.

We did some investigation in this area for e4.  We looked at the native capabilies for WPF, Flex and Dojo.  The code that you have written is non-native (but interesting).  Generally speaking, if a platform supports something natively, we implement it natively (usually for performance reasons in graphics).  If there is no native implementation, we emulate it.  In either case, the native capability and way of doing things generally drive our choice of API.  For example, we wouldn't define an API that was slow or impossible to implement on a platform just because we thought that something should work a certain way.

Please open a bug report and attach your code.  Put me on the CC.  We can continue the discussion there.



"Laurent M." <totolaricot@xxxxxxx>
Sent by: platform-swt-dev-bounces@xxxxxxxxxxx

07/08/2008 11:24 AM

Please respond to
"Eclipse Platform SWT component developers list."        <platform-swt-dev@xxxxxxxxxxx>

To
platform-swt-dev@xxxxxxxxxxx
cc
Subject
[platform-swt-dev] Re: SWT imaging API?






I posted that in the eclipse.plaftorm.swt list, and Chris Aniszczyk suggested doing it here instead.

cheers,
LM.

L. Mihalkovic wrote: basically I have some functional code, all it is missing is a public face (right now it is all in org.eclipse.swt.graphics.image).  I used Swing as a template public api to make the transition easier for people who already know it, but I really don't care what things are called... can someone decide what they want for an API (or let me know that they don't care either)?!
L. Mihalkovic wrote: are there any plans to devise an official SWT image filtering/transformation API?  the following article seemed to imply that some work was done some time ago to explore thing, but the code attached does not show the begining of any sort of API (just that something can be done):

the "sample image effects in SWT"

http://www.eclipse.org/articles/article.php?file=Article-SimpleImageEffectsForSWT/index.html

in the absence of some guidelines from SN/GG I wrapped my code behind an equivalent of swing's ImageOp/RasterOp/ConvolutionOp: I built a wrapper layer that kinda provides the Raster implementation (wrapped around ImageData) and a ColorModel (wrapped around PaletteData). I also defined a Kernel class rather than just pass a float[] around. there is also a FastGaussianBlurOp (thx to romain/chet for the ideas), and it's pretty easy to create additional filters. at the moment it is all portable code based on ImageData, but more optimized than the examples included with the article on the eclipse web site (does not use the slow getPixel()/setPixel()). it should be trivial to make platform specific versions of based on native apis when something is available.

cheers
LM/

[attached various convolution tests]




sharpening


bluring


edge detection


_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top