Telerik blogs
It’s been a while since the last post on the ImageEditor for Windows Phone[0]. For those who haven't played with UI for Windows Phone[1] yet, the Image Editor is a tool that enables in-app image editing which is particularly if you want to enable user to edit and save images without leaving your app. The Image Editor has a wide range of in-built functionalities but also provides extension points which can be used, for example to create new effects or modify the default ones. The Nokia Imaging SDK[2] contains a great selection of image-manipulation tools which can be integrated in the Image Editor quite fast. 

In this post you’ll see how to improve the performance of an effect that is already built into the ImageEditor and also create a new effect that turns images into sketches. 

Improving the ColorEffects tool

The ColorEffects tool is part of the Image Editor and allows you to apply greyscale, invert or auto-fix the colors of an image. The most important properties are IsColorFixed, IsGreyscale and IsColorInverted, and only one can be set to "true" at a given time.

Changing the final result of the image happens in the OnIsInvertedChanged(...), OnIsGrayScaleChanged(...) and OnIsColorFixedChanged(...) overrides.






Create Sketch Effect

The second part of this article focuses on creating a new tool for the Image Editor that turns an image into a sketch, again using the algorithms that are part of the Nokia SDK. The tool should also allow for switching between gray and color sketch mode. 
The fastest way to implement a new tool is to inherit it from either ImageEditorTool or RangeTool and override ApplyCore(...) to render the desired output.

Adding the two new effects can happen either through XAML or in the code-behind.




Feel free to share your experience with the Nokia Imaging SDK and our tools. The source code of the app used in this article is available on github.

[0]: Telerik Image Editor for Windows Phone
[1]: UI for Windows Phone
[2]: Nokia Imaging SDK


About the Author

Kiril Stanoev

Hi, I'm Kiril and I'm the Product Manager of Telerik UI for Android, Windows Universal and Windows Phone. Feel free to ping me on +KirilStanoev or @KirilStanoev

Comments

Comments are disabled in preview mode.