Lumia Imaging SDK 3.0 now available with UWP support

Discussion in 'Live RSS Feeds' started by News, Sep 29, 2015.

  1. News

    News Extraordinary Robot
    News Feed

    Joined:
    Jun 27, 2006
    Messages:
    26,216
    Likes Received:
    20
    Lumia Imaging SDK, a popular toolset that Microsoft also internally uses to implement some of its imaging apps, has been updated to version 3.0. Previous versions of the SDK have already powered applications with a total of over 100 million downloads and now has support for Windows 10 UWP (Universal Windows Platform) to target smartphones, tablets and computers running Windows 10. In addition to Windows 10, development for both Windows 8.1 and Windows Phone 8.1 platforms continues to be supported. The SDK is implemented as Windows Runtime Component, allowing its APIs to be called from applications written in C#, C++, JavaScript and Visual Basic. To get started with Lumia Imaging SDK 3.0 development for Windows 10, install the SDK using NuGet Package Manager straight in Visual Studio or download the package from nuget.org

    The key feature introduced in Lumia Imaging SDK 3.0 is support for GPU based image processing through Direct2D. For most applications, this leads to significant performance improvement compared to the same application implemented with an earlier CPU-only version of the SDK. Where possible, exact implementation details of GPU support have been abstracted away from the API so that majority of the developers don’t need to be aware of what’s happening under the hood.

    Another focus area in the 3.0 release is interoperability with other Windows 10 APIs: rendering to SwapChainPanel is supported, and Direct3DSurface, SoftwareBitmap and WriteableBitmap can be used both as image sources as well as rendering targets. With its high abstraction level and wide range of features, Lumia Imaging SDK 3.0 complements other Windows imaging APIs like Win2D and Windows Imaging Component (WIC).

    As a concrete example of API interoperability, here’s how output from Lumia Imaging SDK 3.0 can be directed to a UI element using SwapChainPanel in just few lines of code. First, we define a XAML page with SwapChainPanel element named “m_targetSwapChainPanel”:


    <Page
    x:Class="WindowsBlogSample.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:WindowsBlogSample"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
    <StackPanel Margin="5,5,5,5">
    <SwapChainPanel Width="800" Height="600" Name="m_targetSwapChainPanel"/>
    </StackPanel>
    </Grid>
    </Page>


    With the SwapChainPanel UI element defined, we can now render directly to it by attaching a SwapChainPanelRenderer and calling RenderAsync:


    var imageStorageFile = await KnownFolders.PicturesLibrary.GetFileAsync("Sample.jpg");

    using (var source = new StorageFileImageSource(imageStorageFile))
    using (var contrastEffect = new ContrastEffect(source) { Level = 0.6})
    using (var sharpnessEffect = new SharpnessEffect(contrastEffect) {Level = 0.2})
    using (var renderer = new SwapChainPanelRenderer(sharpnessEffect, m_targetSwapChainPanel))
    {
    await renderer.RenderAsync();
    }


    Image pair below shows the original image and processed result:

    [​IMG] [​IMG]

    To get started with Lumia Imaging SDK 3.0 development for Windows 10, install the SDK using NuGet Package Manager straight in Visual Studio or download the package from nuget.org. Remember to also check out SDK repository on GitHub for sample projects and snippets of useful open source code! SDK documentation is available online at MSDN.

    Have fun with the SDK!

    Continue reading...
     

Share This Page

Loading...