Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[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


Back to the top