×
Namespaces

Variants
Actions

Filter Recipe Template

From Nokia Developer Wiki
Jump to: navigation, search

Contents

How to create a new filter recipe page

Note.pngNote: Delete this entire section when you are done with your article.

  • If you are new to the Nokia Developer Wiki, read the Wiki Editing Quickstart for guidance.
  • Title your filter recipe as follows:
Name Filter Recipe (Nokia Imaging SDK) where Name is the name of your filter
  • Add the Nokia Imaging SDK Filter Recipes category to your page
  • If you are entering this Filter Recipe into a Wiki Challenge, be sure to follow the guidelines in the Wiki Challenge Description to officially enter your recipe into the Challenge.
  • You can view examples of completed filter recipe pages on the Nokia Imaging SDK FIlter Recipes page.

In the Abstract below, replace description with a few words that describe what the effect you're creating looks like.

This article explains how to create a description effect by chaining together the Nokia Imaging SDK inbuilt filters.

Update as many applicable fields in the ArticleMetaData template as you can. At minimum, make sure to update the creationdate and author fields.

Article Metadata
Article
Created: ()
Last edited: BuildNokia (12 Apr 2014)

Introduction

Explain the visual effect of the filter you are creating, and explain how the included filters work together to create the final effect.

This article shows how to create a filtername filter.

The article includes the recipe source code, instructions on how it can be used and tested, performance measurements and a gallery.

Include an image that shows the final results of the filter you are creating. [[File:filename.jpg|none|frame|Filter Name]]


Source code

The code for creating the effect, source, renderer and target is described in #How to use the filter and Core concepts (Nokia Developer Library). The fragment below shows only the "recipe-specific" code for adding the filters to the List<IFilter>.

var filters = new List<IFilter>();

Include a code snippet that shows how to combine the inbuilt filters to create a new effect.

// "Filter Name"
filters.Add(new UseThisFilter(params));
filters.Add(new AlsoUseThisFilter(params));
...


How to use the filter

This recipe uses only filters based on IFilter. These are combined by simply adding them to an IFilter list, which is then passed to a FilterEffect along with the source. The code fragment below shows the general strategy (this is explained in more detail in Nokia Developer SDK - Core concepts).

var filters = new List<IFilter>();
//The recipe filters are added here
...
...
 
using (var source = new StreamImageSource(stream))
using (var filterEffect = new FilterEffect(source) { Filters = filters })
using (var renderer = new WriteableBitmapRenderer(filterEffect, writeableBitmap))
{
await renderer.RenderAsync();
}


Testing the filter

The easiest way to test the recipes is to add them to the Test Apps for Viewing Custom Filters (Nokia Imaging SDK) (a fork of the Real Time Filter Demo).

License

The code has been released with the standard MIT License.

Performance

Test your filter on whatever devices you have available, and/or using Remote Device Access, and add performance measurements here.

This section lists the approximate frame rate range (in frames-per-second) obtained by using the recipe in the Test framework.

Device FPS (Frames Per Second)
Lumia 1020 n FPS
- -

Gallery

Include the original image and what the image looks like with the filter applied. The more examples, the better.

This page was last modified on 12 April 2014, at 03:42.
97 page views in the last 30 days.
×