Skip to main content Skip to main content Windows Experience Devices Windows Developer Microsoft Edge Windows Insider Microsoft 365 Microsoft 365 Azure Copilot Windows Surface Xbox Deals Small Business Support Windows Apps Outlook OneDrive Microsoft Teams OneNote Microsoft Edge Moving from Skype to Teams Computers Shop Xbox Accessories VR & mixed reality Certified Refurbished Trade-in for cash Xbox Game Pass Ultimate PC Game Pass Xbox games PC games Microsoft AI Microsoft Security Dynamics 365 Microsoft 365 for business Microsoft Power Platform Windows 365 Small Business Digital Sovereignty Azure Microsoft Developer Microsoft Learn Support for AI marketplace apps Microsoft Tech Community Microsoft Marketplace Marketplace Rewards Visual Studio Microsoft Rewards Free downloads & security Education Gift cards Licensing Unlocked stories View Sitemap
September 29, 2015
Mobile

Lumia Imaging SDK 3.0 now available with UWP support



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”:

[code lang=”xml”]
<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>
[/code]

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

[code lang=”csharp”]
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();
}
[/code]

Image pair below shows the original image and processed result:

1_lumiaImageSdkUnchangedImage

2_lumiaImageSdkSharpenedImage

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!

Your Privacy Choices Opt-Out Icon Your Privacy Choices
Consumer Health Privacy Sitemap Contact Microsoft Privacy Manage cookies Terms of use Trademarks Safety & eco Recycling About our ads