SlideShare a Scribd company logo
1 of 32
Download to read offline
Imaging on
Windows Phone
Nguyen Pham
Nokia Developer Champion
Pham.nguyen@Hotmail.com
http://phamnguyen.info
Windows Phone 8 – Imaging on Windows Phone
• Lenses
• Nokia Imaging SDK
• Windows Phone Photo Extensibility

Microsoft confidential
Lenses

3

Microsoft confidential

11/5/2013
Creating a Lens
• A Lens is a custom camera application which can be

accessed from within the camera application
• An application is flagged as a Lens application by
setting a flag in the manifest and providing icons
that can be used to browse for the Lens when the
camera is in use
• I’ve created a Imagine Cam lens application which I
have registered in this way
Creating a Lens application
<Extensions>
<Extension ExtensionName="Camera_Capture_App"
ConsumerID="{5B04B775-356B-4AA0-AAF8-6491FFEA5631}"
TaskID="_default" />
</Extensions>
• This text must be added to the WMAppManifest.xml file for the application, just after the
<Tokens> section
• There is no GUI for this alteration, you have to edit the XML directly
Adding the Lens Icons

• Three Icons are required, one for each Windows Phone screen size
• WVGA

173 × 173

AssetsLens.Screen-WVGA.png

• 720p

259 × 259

AssetsLens.Screen-720p.png

• WXGA

277 × 277

AssetsLens.Screen-WXGA.png

• They are all placed in the Assets folder of the application
• Use a transparent background to match the Windows Phone color scheme
Creating an Auto-Uploader for photos
<Extensions>
<Extension ExtensionName="Photos_Auto_Upload"
ConsumerID="{5B04B775-356B-4AA0-AAF8-6491FFEA5632}"
TaskID="_default" />
</Extensions>

• You can also create an application that has an auto-upload behaviour for pictures that the
user may take
• The upload behaviour is a “resource intensive” background task
• The application must set the extension shown above and display a settings page where the
user can set authentication and upload options

• This is a background process and therefore might not get to run
Create Rich Media Editing
<Extensions>
<Extension ExtensionName="Photos_Rich_Media_Edit"
ConsumerID="{5B04B775-356B-4AA0-AAF8-6491FFEA5632}"
TaskID="_default" />
</Extensions>
The navigation URI looks just as you would expect:
/MainPage.xaml?Action=RichMediaEdit&token={2fad1162-7f85-4d6c-bbd6aee6f10e501d}

8

Microsoft confidential

11/5/2013
Other Extensions
<Extensions>
<Extension ExtensionName="Photos_Extra_Hub"
ConsumerID="{5B04B775-356B-4AA0-AAF8-6491FFEA5632}"
TaskID="_default" />
<Extension ExtensionName="Photos_Extra_Share"
ConsumerID="{5B04B775-356B-4AA0-AAF8-6491FFEA5632}"
TaskID="_default" />
<Extension ExtensionName="Photos_Extra_Image_Editor"
ConsumerID="{5B04B775-356B-4AA0-AAF8-6491FFEA5632}"
TaskID="_default" />
</Extensions>

9

Microsoft confidential

11/5/2013
Override UriMapper
class UriMapper : UriMapperBase
{
public override Uri MapUri(Uri uri)
{
Uri mappedUri = uri;
string url = uri.ToString();
if (url.Contains("ViewfinderLaunch"))
{
mappedUri = new Uri("/Pages/CamPage.xaml", UriKind.Relative);
}
else if (url.Contains("RichMediaEdit") || url.Contains("ShareContent") ||
url.Contains("EditPhotoContent"))
{
string photoUrl = url.Replace("CamPage", "PhotoPage").Replace("FileId", "token");
mappedUri = new Uri(photoUrl, UriKind.Relative);
}
return mappedUri;
}
}
Code in contructor of app class:
RootFrame.UriMapper = new Helpers.UriMapper();
10

Microsoft confidential

11/5/2013
11

Microsoft confidential

11/5/2013
Nokia Imaging
SDK

12

Microsoft confidential

11/5/2013
Nokia Imaging SDK
• Early Beta version, makes some of the technologies that Nokia uses in its own imaging

applications available to developers
• Provides more than 50 pre-made filters and effects that have been specifically developed
for mobile imaging, with speed and memory performance as key drivers

• The SDK is super-fast, meticulous memory and code optimization
• Allows access to any image data without decoding the whole image
• Apply effects to high resolution images, without worrying about memory budget
Easy to use
• Add a filter to your existing project with just a few lines of C#.
• Support to be called from C++ code.
• The filters can be chained to create more effects
List Of Filter and Effect I
List Of Filter and Effect II
List Of Filter and Effect III
Core concepts
• Provided as a Windows Phone Runtime library
• One of the key benefits of this is that developers can call the
methods of the library from C#, Visual Basic, or C++.
Step 1: Include Nokia Imaging SDK Libraries into your Project
Step 2 : Create EditingSession
Step 3 : Create and add filters to EditingSession
Step 4 : Use asynchronous methods RenderToImageAsync or
RenderToJpegAsync to produce the final processed image
The libraries
• Before starting to use the functionality provided by the Nokia Imaging SDK, the SDK
libraries must be added to the project.
• Two ways to add the libraries are proposed:
• Using the Visual Studio NuGet package manager

• Adding references to the project. For detailed instructions
The libraries (Cont.)
Create EditingSession
• Create an Imaging SDK EditingSession using a compressed or uncompressed image:
• From a Stream (from PhotoChooserTask):

EditingSession session = await CreateEditingSessionAsync(stream);
• From a JPEG in a IBuffer:

EditingSession session = new EditingSession(jpegData);
• From a WriteableBitmap:

EditingSession session = new EditingSession(sourceBitmap);
Create and add filters and effects
• Use FilterFactory to create filters and effects
• Use EditingSession methods to add filters and effects:

session.AddFilter(FilterFactory.CreateCartoonFilter(true));
session.AddFilter(FilterFactory.CreateFogFilter());
• You can also use FilterGroup to add several filters and effects in one call
Produce final processed image
• You can render the processed image to:
• A XAML Image control:

await session.RenderToImageAsync(FilteredImage);
• A WriteableBitmap :

await session.RenderToWriteableBitmapAsync(FilteredBitmap);
• An IBuffer :

IBuffer jpegOut = await session.RenderToJpegAsync();
23

11/5/2013
Editing-session code
using Nokia.Graphics.Imaging;
using (EditingSession editsession = new EditingSession(inputBuffer))
{
// First add an antique effect
editsession.AddFilter( FilterFactory.CreateAntiqueFilter());
// Then rotate the image
editsession.AddFilter( FilterFactory.CreateFreeRotationFilter(35.0f, RotationScaleMode.FitInside));
// Add more filters here if you want... // Finally, execute the filtering and render to a bitmap await
editsession.RenderToBitmapAsync(outputBuffer);

}
License
Contains functionality provided by the Nokia Imaging SDK.
Copyright © 2013 Nokia Corporation
All rights reserved.

25

11/5/2013
Demo

26

Microsoft confidential

11/5/2013
Nokia Project sample

Filter Effects

Real-time Filter

Filter Explorer
Imagine Cam
28

Microsoft confidential

11/5/2013

Imagine Cam
Imagine Cam

29

11/5/2013
Resource
• You found an error in the SDK, have suggestions, need help?
• Nokia Imaging discussion board: http://nokia.ly/DiBoImg
• You have developped an app with the SDK?
• We’d love to hear about it. Tell us by sending a mail at
developerrelations.marketing@nokia.com
• Documentation and code samples
• Imaging in the Lumia Developer’s Library: http://nokia.ly/WP_lib_img
• Nokia Imaging SDK: http://www.developer.nokia.com/imaging
• Windows Phone 7.5 Training Kit : http://www.microsoft.com/en-

us/download/details.aspx?id=28564
• Windows Phone 8 Training kit: http://www.microsoft.com/enus/download/details.aspx?id=35777
Pham.nguyen@Hotmail.com
http://phamnguyen.info
The information herein is for informational
purposes only an represents the current view of
Microsoft Corporation as of the date of this
presentation. Because Microsoft must respond
to changing market conditions, it should not be

interpreted to be a commitment on the part of
Microsoft, and Microsoft cannot guarantee the
accuracy of any information provided after the
date of this presentation.

MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION
IN THIS PRESENTATION.

© 2012 Microsoft Corporation.
All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

More Related Content

Similar to 7.imaging on windows phone

06.Programming Media on Windows Phone
06.Programming Media on Windows Phone06.Programming Media on Windows Phone
06.Programming Media on Windows PhoneNguyen Tuan
 
Case study on Movie Quiz App For IPhone and IPad – Facebook Enabled
Case study on Movie Quiz App For IPhone and IPad –  Facebook Enabled Case study on Movie Quiz App For IPhone and IPad –  Facebook Enabled
Case study on Movie Quiz App For IPhone and IPad – Facebook Enabled Grey Matter India Technologies PVT LTD
 
LUMIA APP LABS #18: INTRODUCING NOKIA IMAGING SDK 1.0
LUMIA APP LABS #18: INTRODUCING NOKIA IMAGING SDK 1.0LUMIA APP LABS #18: INTRODUCING NOKIA IMAGING SDK 1.0
LUMIA APP LABS #18: INTRODUCING NOKIA IMAGING SDK 1.0Microsoft Mobile Developer
 
Valentine with Angular js - Introduction
Valentine with Angular js - IntroductionValentine with Angular js - Introduction
Valentine with Angular js - IntroductionSenthil Kumar
 
World 2013 - Pushing MicroStrategy to the Limit, The Hacker Way
World 2013 - Pushing MicroStrategy to the Limit, The Hacker WayWorld 2013 - Pushing MicroStrategy to the Limit, The Hacker Way
World 2013 - Pushing MicroStrategy to the Limit, The Hacker WayBryan Brandow
 
zaid ppt.pptx
zaid ppt.pptxzaid ppt.pptx
zaid ppt.pptxaasim40
 
Introduction to Bitreactive
Introduction to BitreactiveIntroduction to Bitreactive
Introduction to BitreactiveGhassen Chaieb
 
Working with camera and imaging on Nokia Asha software platform 1.0
Working with camera and imaging on Nokia Asha software platform 1.0Working with camera and imaging on Nokia Asha software platform 1.0
Working with camera and imaging on Nokia Asha software platform 1.0Microsoft Mobile Developer
 
Mobile AR Lecture 7 - Introduction to Vuforia
Mobile AR Lecture 7 - Introduction to VuforiaMobile AR Lecture 7 - Introduction to Vuforia
Mobile AR Lecture 7 - Introduction to VuforiaMark Billinghurst
 
Introduction to DL-BUILDER
Introduction to DL-BUILDERIntroduction to DL-BUILDER
Introduction to DL-BUILDERssuserc37b5e
 
UiPath Task Capture training.pdf
UiPath Task Capture training.pdfUiPath Task Capture training.pdf
UiPath Task Capture training.pdfCristina Vidu
 
LUMIA APP LAB #15: USING THE NOKIA IMAGING SDK
LUMIA APP LAB #15: USING THE NOKIA IMAGING SDKLUMIA APP LAB #15: USING THE NOKIA IMAGING SDK
LUMIA APP LAB #15: USING THE NOKIA IMAGING SDKMicrosoft Mobile Developer
 
Blazing fast web experience at your fingertips with Experience Edge, JSS for ...
Blazing fast web experience at your fingertips with Experience Edge, JSS for ...Blazing fast web experience at your fingertips with Experience Edge, JSS for ...
Blazing fast web experience at your fingertips with Experience Edge, JSS for ...VarunNehra
 
Office Add-ins community call-March 2019
Office Add-ins community call-March 2019Office Add-ins community call-March 2019
Office Add-ins community call-March 2019Microsoft 365 Developer
 
RICOH THETA x IoT Developers Contest : Cloud API Seminar
 RICOH THETA x IoT Developers Contest : Cloud API Seminar RICOH THETA x IoT Developers Contest : Cloud API Seminar
RICOH THETA x IoT Developers Contest : Cloud API Seminarcontest-theta360
 
GAB2017 - Azure function to build serverless SharePoint apps
GAB2017 - Azure function to build serverless SharePoint appsGAB2017 - Azure function to build serverless SharePoint apps
GAB2017 - Azure function to build serverless SharePoint appsRiwut Libinuko
 
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0EMC Documentum xCP 2.2 Self Paced Tutorial v1.0
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0Haytham Ghandour
 

Similar to 7.imaging on windows phone (20)

06.Programming Media on Windows Phone
06.Programming Media on Windows Phone06.Programming Media on Windows Phone
06.Programming Media on Windows Phone
 
Case study on Movie Quiz App For IPhone and IPad – Facebook Enabled
Case study on Movie Quiz App For IPhone and IPad –  Facebook Enabled Case study on Movie Quiz App For IPhone and IPad –  Facebook Enabled
Case study on Movie Quiz App For IPhone and IPad – Facebook Enabled
 
Web works hol
Web works holWeb works hol
Web works hol
 
LUMIA APP LABS #18: INTRODUCING NOKIA IMAGING SDK 1.0
LUMIA APP LABS #18: INTRODUCING NOKIA IMAGING SDK 1.0LUMIA APP LABS #18: INTRODUCING NOKIA IMAGING SDK 1.0
LUMIA APP LABS #18: INTRODUCING NOKIA IMAGING SDK 1.0
 
Valentine with Angular js - Introduction
Valentine with Angular js - IntroductionValentine with Angular js - Introduction
Valentine with Angular js - Introduction
 
World 2013 - Pushing MicroStrategy to the Limit, The Hacker Way
World 2013 - Pushing MicroStrategy to the Limit, The Hacker WayWorld 2013 - Pushing MicroStrategy to the Limit, The Hacker Way
World 2013 - Pushing MicroStrategy to the Limit, The Hacker Way
 
DEEPAK RAWAT
DEEPAK RAWATDEEPAK RAWAT
DEEPAK RAWAT
 
zaid ppt.pptx
zaid ppt.pptxzaid ppt.pptx
zaid ppt.pptx
 
Homestead demo
Homestead demoHomestead demo
Homestead demo
 
Introduction to Bitreactive
Introduction to BitreactiveIntroduction to Bitreactive
Introduction to Bitreactive
 
Working with camera and imaging on Nokia Asha software platform 1.0
Working with camera and imaging on Nokia Asha software platform 1.0Working with camera and imaging on Nokia Asha software platform 1.0
Working with camera and imaging on Nokia Asha software platform 1.0
 
Mobile AR Lecture 7 - Introduction to Vuforia
Mobile AR Lecture 7 - Introduction to VuforiaMobile AR Lecture 7 - Introduction to Vuforia
Mobile AR Lecture 7 - Introduction to Vuforia
 
Introduction to DL-BUILDER
Introduction to DL-BUILDERIntroduction to DL-BUILDER
Introduction to DL-BUILDER
 
UiPath Task Capture training.pdf
UiPath Task Capture training.pdfUiPath Task Capture training.pdf
UiPath Task Capture training.pdf
 
LUMIA APP LAB #15: USING THE NOKIA IMAGING SDK
LUMIA APP LAB #15: USING THE NOKIA IMAGING SDKLUMIA APP LAB #15: USING THE NOKIA IMAGING SDK
LUMIA APP LAB #15: USING THE NOKIA IMAGING SDK
 
Blazing fast web experience at your fingertips with Experience Edge, JSS for ...
Blazing fast web experience at your fingertips with Experience Edge, JSS for ...Blazing fast web experience at your fingertips with Experience Edge, JSS for ...
Blazing fast web experience at your fingertips with Experience Edge, JSS for ...
 
Office Add-ins community call-March 2019
Office Add-ins community call-March 2019Office Add-ins community call-March 2019
Office Add-ins community call-March 2019
 
RICOH THETA x IoT Developers Contest : Cloud API Seminar
 RICOH THETA x IoT Developers Contest : Cloud API Seminar RICOH THETA x IoT Developers Contest : Cloud API Seminar
RICOH THETA x IoT Developers Contest : Cloud API Seminar
 
GAB2017 - Azure function to build serverless SharePoint apps
GAB2017 - Azure function to build serverless SharePoint appsGAB2017 - Azure function to build serverless SharePoint apps
GAB2017 - Azure function to build serverless SharePoint apps
 
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0EMC Documentum xCP 2.2 Self Paced Tutorial v1.0
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0
 

More from Nguyên Phạm

What’s new in WinJS? Windows Phone 8.1 and the road ahead
What’s new in WinJS? Windows Phone 8.1 and the road aheadWhat’s new in WinJS? Windows Phone 8.1 and the road ahead
What’s new in WinJS? Windows Phone 8.1 and the road aheadNguyên Phạm
 
Building HTML and JavaScript Apps with KnockoutJS and MVVM
Building HTML and JavaScript Apps with KnockoutJS and MVVMBuilding HTML and JavaScript Apps with KnockoutJS and MVVM
Building HTML and JavaScript Apps with KnockoutJS and MVVMNguyên Phạm
 
Windows Phone 8 More Than An App
Windows Phone 8 More Than An AppWindows Phone 8 More Than An App
Windows Phone 8 More Than An AppNguyên Phạm
 
Windows Phone 8 Fundamental
Windows Phone 8 FundamentalWindows Phone 8 Fundamental
Windows Phone 8 FundamentalNguyên Phạm
 
Windows Phone Development
Windows Phone DevelopmentWindows Phone Development
Windows Phone DevelopmentNguyên Phạm
 
Windows Phone 7 Platform Overview
Windows Phone 7 Platform OverviewWindows Phone 7 Platform Overview
Windows Phone 7 Platform OverviewNguyên Phạm
 
Windows Phone 7.5 Overview
Windows Phone 7.5 Overview Windows Phone 7.5 Overview
Windows Phone 7.5 Overview Nguyên Phạm
 
WP8 HTML5/IE10 for Developers
WP8 HTML5/IE10 for DevelopersWP8 HTML5/IE10 for Developers
WP8 HTML5/IE10 for DevelopersNguyên Phạm
 

More from Nguyên Phạm (9)

What’s new in WinJS? Windows Phone 8.1 and the road ahead
What’s new in WinJS? Windows Phone 8.1 and the road aheadWhat’s new in WinJS? Windows Phone 8.1 and the road ahead
What’s new in WinJS? Windows Phone 8.1 and the road ahead
 
Building HTML and JavaScript Apps with KnockoutJS and MVVM
Building HTML and JavaScript Apps with KnockoutJS and MVVMBuilding HTML and JavaScript Apps with KnockoutJS and MVVM
Building HTML and JavaScript Apps with KnockoutJS and MVVM
 
Windows Phone 8 More Than An App
Windows Phone 8 More Than An AppWindows Phone 8 More Than An App
Windows Phone 8 More Than An App
 
Windows Phone 8 Fundamental
Windows Phone 8 FundamentalWindows Phone 8 Fundamental
Windows Phone 8 Fundamental
 
Expression Blend
Expression BlendExpression Blend
Expression Blend
 
Windows Phone Development
Windows Phone DevelopmentWindows Phone Development
Windows Phone Development
 
Windows Phone 7 Platform Overview
Windows Phone 7 Platform OverviewWindows Phone 7 Platform Overview
Windows Phone 7 Platform Overview
 
Windows Phone 7.5 Overview
Windows Phone 7.5 Overview Windows Phone 7.5 Overview
Windows Phone 7.5 Overview
 
WP8 HTML5/IE10 for Developers
WP8 HTML5/IE10 for DevelopersWP8 HTML5/IE10 for Developers
WP8 HTML5/IE10 for Developers
 

Recently uploaded

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Recently uploaded (20)

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

7.imaging on windows phone

  • 1. Imaging on Windows Phone Nguyen Pham Nokia Developer Champion Pham.nguyen@Hotmail.com http://phamnguyen.info
  • 2. Windows Phone 8 – Imaging on Windows Phone • Lenses • Nokia Imaging SDK • Windows Phone Photo Extensibility Microsoft confidential
  • 4. Creating a Lens • A Lens is a custom camera application which can be accessed from within the camera application • An application is flagged as a Lens application by setting a flag in the manifest and providing icons that can be used to browse for the Lens when the camera is in use • I’ve created a Imagine Cam lens application which I have registered in this way
  • 5. Creating a Lens application <Extensions> <Extension ExtensionName="Camera_Capture_App" ConsumerID="{5B04B775-356B-4AA0-AAF8-6491FFEA5631}" TaskID="_default" /> </Extensions> • This text must be added to the WMAppManifest.xml file for the application, just after the <Tokens> section • There is no GUI for this alteration, you have to edit the XML directly
  • 6. Adding the Lens Icons • Three Icons are required, one for each Windows Phone screen size • WVGA 173 × 173 AssetsLens.Screen-WVGA.png • 720p 259 × 259 AssetsLens.Screen-720p.png • WXGA 277 × 277 AssetsLens.Screen-WXGA.png • They are all placed in the Assets folder of the application • Use a transparent background to match the Windows Phone color scheme
  • 7. Creating an Auto-Uploader for photos <Extensions> <Extension ExtensionName="Photos_Auto_Upload" ConsumerID="{5B04B775-356B-4AA0-AAF8-6491FFEA5632}" TaskID="_default" /> </Extensions> • You can also create an application that has an auto-upload behaviour for pictures that the user may take • The upload behaviour is a “resource intensive” background task • The application must set the extension shown above and display a settings page where the user can set authentication and upload options • This is a background process and therefore might not get to run
  • 8. Create Rich Media Editing <Extensions> <Extension ExtensionName="Photos_Rich_Media_Edit" ConsumerID="{5B04B775-356B-4AA0-AAF8-6491FFEA5632}" TaskID="_default" /> </Extensions> The navigation URI looks just as you would expect: /MainPage.xaml?Action=RichMediaEdit&token={2fad1162-7f85-4d6c-bbd6aee6f10e501d} 8 Microsoft confidential 11/5/2013
  • 9. Other Extensions <Extensions> <Extension ExtensionName="Photos_Extra_Hub" ConsumerID="{5B04B775-356B-4AA0-AAF8-6491FFEA5632}" TaskID="_default" /> <Extension ExtensionName="Photos_Extra_Share" ConsumerID="{5B04B775-356B-4AA0-AAF8-6491FFEA5632}" TaskID="_default" /> <Extension ExtensionName="Photos_Extra_Image_Editor" ConsumerID="{5B04B775-356B-4AA0-AAF8-6491FFEA5632}" TaskID="_default" /> </Extensions> 9 Microsoft confidential 11/5/2013
  • 10. Override UriMapper class UriMapper : UriMapperBase { public override Uri MapUri(Uri uri) { Uri mappedUri = uri; string url = uri.ToString(); if (url.Contains("ViewfinderLaunch")) { mappedUri = new Uri("/Pages/CamPage.xaml", UriKind.Relative); } else if (url.Contains("RichMediaEdit") || url.Contains("ShareContent") || url.Contains("EditPhotoContent")) { string photoUrl = url.Replace("CamPage", "PhotoPage").Replace("FileId", "token"); mappedUri = new Uri(photoUrl, UriKind.Relative); } return mappedUri; } } Code in contructor of app class: RootFrame.UriMapper = new Helpers.UriMapper(); 10 Microsoft confidential 11/5/2013
  • 13. Nokia Imaging SDK • Early Beta version, makes some of the technologies that Nokia uses in its own imaging applications available to developers • Provides more than 50 pre-made filters and effects that have been specifically developed for mobile imaging, with speed and memory performance as key drivers • The SDK is super-fast, meticulous memory and code optimization • Allows access to any image data without decoding the whole image • Apply effects to high resolution images, without worrying about memory budget
  • 14. Easy to use • Add a filter to your existing project with just a few lines of C#. • Support to be called from C++ code. • The filters can be chained to create more effects
  • 15. List Of Filter and Effect I
  • 16. List Of Filter and Effect II
  • 17. List Of Filter and Effect III
  • 18. Core concepts • Provided as a Windows Phone Runtime library • One of the key benefits of this is that developers can call the methods of the library from C#, Visual Basic, or C++. Step 1: Include Nokia Imaging SDK Libraries into your Project Step 2 : Create EditingSession Step 3 : Create and add filters to EditingSession Step 4 : Use asynchronous methods RenderToImageAsync or RenderToJpegAsync to produce the final processed image
  • 19. The libraries • Before starting to use the functionality provided by the Nokia Imaging SDK, the SDK libraries must be added to the project. • Two ways to add the libraries are proposed: • Using the Visual Studio NuGet package manager • Adding references to the project. For detailed instructions
  • 21. Create EditingSession • Create an Imaging SDK EditingSession using a compressed or uncompressed image: • From a Stream (from PhotoChooserTask): EditingSession session = await CreateEditingSessionAsync(stream); • From a JPEG in a IBuffer: EditingSession session = new EditingSession(jpegData); • From a WriteableBitmap: EditingSession session = new EditingSession(sourceBitmap);
  • 22. Create and add filters and effects • Use FilterFactory to create filters and effects • Use EditingSession methods to add filters and effects: session.AddFilter(FilterFactory.CreateCartoonFilter(true)); session.AddFilter(FilterFactory.CreateFogFilter()); • You can also use FilterGroup to add several filters and effects in one call
  • 23. Produce final processed image • You can render the processed image to: • A XAML Image control: await session.RenderToImageAsync(FilteredImage); • A WriteableBitmap : await session.RenderToWriteableBitmapAsync(FilteredBitmap); • An IBuffer : IBuffer jpegOut = await session.RenderToJpegAsync(); 23 11/5/2013
  • 24. Editing-session code using Nokia.Graphics.Imaging; using (EditingSession editsession = new EditingSession(inputBuffer)) { // First add an antique effect editsession.AddFilter( FilterFactory.CreateAntiqueFilter()); // Then rotate the image editsession.AddFilter( FilterFactory.CreateFreeRotationFilter(35.0f, RotationScaleMode.FitInside)); // Add more filters here if you want... // Finally, execute the filtering and render to a bitmap await editsession.RenderToBitmapAsync(outputBuffer); }
  • 25. License Contains functionality provided by the Nokia Imaging SDK. Copyright © 2013 Nokia Corporation All rights reserved. 25 11/5/2013
  • 27. Nokia Project sample Filter Effects Real-time Filter Filter Explorer
  • 30. Resource • You found an error in the SDK, have suggestions, need help? • Nokia Imaging discussion board: http://nokia.ly/DiBoImg • You have developped an app with the SDK? • We’d love to hear about it. Tell us by sending a mail at developerrelations.marketing@nokia.com • Documentation and code samples • Imaging in the Lumia Developer’s Library: http://nokia.ly/WP_lib_img • Nokia Imaging SDK: http://www.developer.nokia.com/imaging
  • 31. • Windows Phone 7.5 Training Kit : http://www.microsoft.com/en- us/download/details.aspx?id=28564 • Windows Phone 8 Training kit: http://www.microsoft.com/enus/download/details.aspx?id=35777
  • 32. Pham.nguyen@Hotmail.com http://phamnguyen.info The information herein is for informational purposes only an represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.