SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Downloaden Sie, um offline zu lesen
Asha Idea to App:
Imaging
Michael Samarin
Director,
Developer Training and Evangelism
Futurice
@MichaelSamarin
http://developer.nokia.com/asha/java/downloads
Manager
Player ControlData Source
javax.microedition.media
URLs
“capture://image”
“capture://video”
Live viewfinder VideoControl
RecordControl
Form videoForm;
Item videoItem;
Player player;
VideoControl videoControl;
player = Manager.createPlayer("capture://image");
//player = Manager.createPlayer("capture://video");
player.prefetch();
player.realize();
player.start();
videoControl = (VideoControl)player.getControl("VideoControl");
videoItem = (Item)videoControl.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, null);
videoForm.append(videoItem);
byte[] imageBytes = videoControl.getSnapshot(null);
Image image = Image.createImage(imageBytes, 0, imageBytes.length);
ImageItem imageItem = new ImageItem("", image, Item.PLAIN, "");
videoForm.append(image);
String fileName = System.getProperty("fileconn.dir.photos”)
+
"CapturedImage.jpg";
FileConnection file = (FileConnection) Connector.open(fileName,
Connector.READ_WRITE);
if (!file.exists()) file.create();
OutputStream out = file.openOutputStream();
out.write(imageBytes);
out.close();
file.close();
byte[] imageBytes = videoControl.getSnapshot(null);
//byte[] imageBytes = videoControl.getSnapshot(“width=640&height=480”);
Image image = Image.createImage(imageBytes, 0, imageBytes.length);
ImageItem imageItem = new ImageItem("", image, Item.PLAIN, "");
videoForm.append(image);
String fileName = System.getProperty("fileconn.dir.photos”)
+
"CapturedImage.jpg";
FileConnection file = (FileConnection) Connector.open(fileName,
Connector.READ_WRITE);
if (!file.exists()) file.create();
OutputStream out = file.openOutputStream();
out.write(imageBytes);
out.close();
file.close();
RecordControl recordControl;
recordControl = (RecordControl)player.getControl("RecordControl");
recordControl.setRecordLocation(System.getProperty("fileconn.dir.photos”) +
"CapturedVideo.mp4");
recordControl.startRecord();
...
...
recordControl.stopRecord();
• Displaying live camera viewfinder;
• Taking snapshot;
• Recording video;
ImageScaler imageScaler = new ImageScaler(sourceImageFilePath, destinationFilePath);
imageScaler.addListener(this);
Integer requestId = new Integer(imageScaler.scaleImage(newWidth, newHeight, true));
. . .
public void scaleFinished(int requestId, int result) {
...
}
MediaProcessor mediaProcessor = GlobalManager.createMediaProcessor(JPEG_TYPE);
mediaProcessor.addMediaProcessorListener(this);
...
mediaProcessor.setInput(inputStream, MediaProcessor.UNKNOWN);
...
mediaProcessor.setOutput(byteArrayOutputStream);
ImageEffectControl imageEffect =
(ImageEffectControl) mediaProcessor.getControl(
"javax.microedition.amms.control.imageeffect.ImageEffectControl");
imageEffect.setPreset("monochrome");
imageEffect.setEnabled(true);
mediaProcessor.start();
...
public void mediaProcessorUpdate(MediaProcessor processor,
String event,
Object eventData){
...
}
• Image Scaling API
• Image Effects with APPS
© 2014 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.
The information herein is for informational purposes only and represents the current view of Microsoft* 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. *Microsoft refers to Microsoft Corp. and its affiliates, including Microsoft Mobile Oy, a wholly-owned subsidiary. The Nokia Devices and Services business is part of Microsoft Mobile Oy.
THANK YOU!

Weitere ähnliche Inhalte

Ähnlich wie Asha Idea to App: Imaging Effects and Scaling

Building Rich Web Experience with Silverlight and Microsoft Expression Studio...
Building Rich Web Experience with Silverlight and Microsoft Expression Studio...Building Rich Web Experience with Silverlight and Microsoft Expression Studio...
Building Rich Web Experience with Silverlight and Microsoft Expression Studio...goodfriday
 
Building Web Applications with Windows Azure
Building Web Applications with Windows AzureBuilding Web Applications with Windows Azure
Building Web Applications with Windows Azuregoodfriday
 
There's a Little Scripter in All of Us: Building a Web App for the Masses
There's a Little Scripter in All of Us: Building a Web App for the MassesThere's a Little Scripter in All of Us: Building a Web App for the Masses
There's a Little Scripter in All of Us: Building a Web App for the Massesgoodfriday
 
From Flash to Silverlight: A Rosetta Stone
From Flash to Silverlight: A Rosetta StoneFrom Flash to Silverlight: A Rosetta Stone
From Flash to Silverlight: A Rosetta Stonegoodfriday
 
Alessandro Forte - Model View Presenter
Alessandro Forte - Model View PresenterAlessandro Forte - Model View Presenter
Alessandro Forte - Model View PresenterAlessandro Forte
 
Better Software With Visual Studio 2008 Team System
Better Software With Visual Studio 2008 Team SystemBetter Software With Visual Studio 2008 Team System
Better Software With Visual Studio 2008 Team Systemguested62d1
 
Offline Network Detection in Microsoft Silverlight 3
Offline Network Detection in Microsoft Silverlight 3Offline Network Detection in Microsoft Silverlight 3
Offline Network Detection in Microsoft Silverlight 3goodfriday
 
Microsoft ASP.NET 4.0 Data Access: Patterns for Success with Web Forms
Microsoft ASP.NET 4.0 Data Access: Patterns for Success with Web FormsMicrosoft ASP.NET 4.0 Data Access: Patterns for Success with Web Forms
Microsoft ASP.NET 4.0 Data Access: Patterns for Success with Web Formsgoodfriday
 
Microsoft ASP.NET 4.0 Data Access: Patterns for Success with Web Forms Saturd...
Microsoft ASP.NET 4.0 Data Access: Patterns for Success with Web Forms Saturd...Microsoft ASP.NET 4.0 Data Access: Patterns for Success with Web Forms Saturd...
Microsoft ASP.NET 4.0 Data Access: Patterns for Success with Web Forms Saturd...goodfriday
 
Cloud Infrastruktur für Open Data – Internationale Beispiele, Manfred Gröber
Cloud Infrastruktur für Open Data – Internationale Beispiele, Manfred GröberCloud Infrastruktur für Open Data – Internationale Beispiele, Manfred Gröber
Cloud Infrastruktur für Open Data – Internationale Beispiele, Manfred GröberSemantic Web Company
 
How I choose which services to use in Azure
How I choose which services to use in AzureHow I choose which services to use in Azure
How I choose which services to use in AzureDavide Benvegnù
 
A Lap around Windows Internet Explorer 8_pp2003
A Lap around Windows Internet Explorer 8_pp2003A Lap around Windows Internet Explorer 8_pp2003
A Lap around Windows Internet Explorer 8_pp2003Wes Yanaga
 
Microsoft SQL Server - The Information Platform Vision Presentation
Microsoft SQL Server - The Information Platform Vision PresentationMicrosoft SQL Server - The Information Platform Vision Presentation
Microsoft SQL Server - The Information Platform Vision PresentationMicrosoft Private Cloud
 
Ive got a powershell secret
Ive got a powershell secretIve got a powershell secret
Ive got a powershell secretChris Conte
 
Lessons Learned: Designer/Developer Productivity in Windows Presentation Foun...
Lessons Learned: Designer/Developer Productivity in Windows Presentation Foun...Lessons Learned: Designer/Developer Productivity in Windows Presentation Foun...
Lessons Learned: Designer/Developer Productivity in Windows Presentation Foun...goodfriday
 
Software + Services Microsoft
Software + Services MicrosoftSoftware + Services Microsoft
Software + Services MicrosoftInnocenti Andrea
 

Ähnlich wie Asha Idea to App: Imaging Effects and Scaling (20)

Robotix
RobotixRobotix
Robotix
 
Building Rich Web Experience with Silverlight and Microsoft Expression Studio...
Building Rich Web Experience with Silverlight and Microsoft Expression Studio...Building Rich Web Experience with Silverlight and Microsoft Expression Studio...
Building Rich Web Experience with Silverlight and Microsoft Expression Studio...
 
Building Web Applications with Windows Azure
Building Web Applications with Windows AzureBuilding Web Applications with Windows Azure
Building Web Applications with Windows Azure
 
There's a Little Scripter in All of Us: Building a Web App for the Masses
There's a Little Scripter in All of Us: Building a Web App for the MassesThere's a Little Scripter in All of Us: Building a Web App for the Masses
There's a Little Scripter in All of Us: Building a Web App for the Masses
 
From Flash to Silverlight: A Rosetta Stone
From Flash to Silverlight: A Rosetta StoneFrom Flash to Silverlight: A Rosetta Stone
From Flash to Silverlight: A Rosetta Stone
 
Alessandro Forte - Model View Presenter
Alessandro Forte - Model View PresenterAlessandro Forte - Model View Presenter
Alessandro Forte - Model View Presenter
 
Better Software With Visual Studio 2008 Team System
Better Software With Visual Studio 2008 Team SystemBetter Software With Visual Studio 2008 Team System
Better Software With Visual Studio 2008 Team System
 
Offline Network Detection in Microsoft Silverlight 3
Offline Network Detection in Microsoft Silverlight 3Offline Network Detection in Microsoft Silverlight 3
Offline Network Detection in Microsoft Silverlight 3
 
Microsoft ASP.NET 4.0 Data Access: Patterns for Success with Web Forms
Microsoft ASP.NET 4.0 Data Access: Patterns for Success with Web FormsMicrosoft ASP.NET 4.0 Data Access: Patterns for Success with Web Forms
Microsoft ASP.NET 4.0 Data Access: Patterns for Success with Web Forms
 
Microsoft ASP.NET 4.0 Data Access: Patterns for Success with Web Forms Saturd...
Microsoft ASP.NET 4.0 Data Access: Patterns for Success with Web Forms Saturd...Microsoft ASP.NET 4.0 Data Access: Patterns for Success with Web Forms Saturd...
Microsoft ASP.NET 4.0 Data Access: Patterns for Success with Web Forms Saturd...
 
Cloud Infrastruktur für Open Data – Internationale Beispiele, Manfred Gröber
Cloud Infrastruktur für Open Data – Internationale Beispiele, Manfred GröberCloud Infrastruktur für Open Data – Internationale Beispiele, Manfred Gröber
Cloud Infrastruktur für Open Data – Internationale Beispiele, Manfred Gröber
 
How I choose which services to use in Azure
How I choose which services to use in AzureHow I choose which services to use in Azure
How I choose which services to use in Azure
 
A Lap around Windows Internet Explorer 8_pp2003
A Lap around Windows Internet Explorer 8_pp2003A Lap around Windows Internet Explorer 8_pp2003
A Lap around Windows Internet Explorer 8_pp2003
 
Working with Multiple Android Screens
Working with Multiple Android ScreensWorking with Multiple Android Screens
Working with Multiple Android Screens
 
Microsoft SQL Server - The Information Platform Vision Presentation
Microsoft SQL Server - The Information Platform Vision PresentationMicrosoft SQL Server - The Information Platform Vision Presentation
Microsoft SQL Server - The Information Platform Vision Presentation
 
Vineet Gupta (Microsoft) Keynote
Vineet Gupta (Microsoft) KeynoteVineet Gupta (Microsoft) Keynote
Vineet Gupta (Microsoft) Keynote
 
Ive got a powershell secret
Ive got a powershell secretIve got a powershell secret
Ive got a powershell secret
 
Lessons Learned: Designer/Developer Productivity in Windows Presentation Foun...
Lessons Learned: Designer/Developer Productivity in Windows Presentation Foun...Lessons Learned: Designer/Developer Productivity in Windows Presentation Foun...
Lessons Learned: Designer/Developer Productivity in Windows Presentation Foun...
 
What's Next
What's NextWhat's Next
What's Next
 
Software + Services Microsoft
Software + Services MicrosoftSoftware + Services Microsoft
Software + Services Microsoft
 

Mehr von Microsoft Mobile Developer

Intro to Nokia X software platform 2.0 and tools
Intro to Nokia X software platform 2.0 and toolsIntro to Nokia X software platform 2.0 and tools
Intro to Nokia X software platform 2.0 and toolsMicrosoft Mobile Developer
 
Location based services for Nokia X and Nokia Asha using Geo2tag
Location based services for Nokia X and Nokia Asha using Geo2tagLocation based services for Nokia X and Nokia Asha using Geo2tag
Location based services for Nokia X and Nokia Asha using Geo2tagMicrosoft Mobile Developer
 
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultations
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultationsLumia App Labs: Lessons learned from 50 windows phone 8 design consultations
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultationsMicrosoft Mobile Developer
 
Windows Phone 8 speech: parliamo con la nostra app
Windows Phone 8 speech: parliamo con la nostra appWindows Phone 8 speech: parliamo con la nostra app
Windows Phone 8 speech: parliamo con la nostra appMicrosoft Mobile Developer
 
La pubblicazione di un'applicazione sullo store
La pubblicazione di un'applicazione sullo storeLa pubblicazione di un'applicazione sullo store
La pubblicazione di un'applicazione sullo storeMicrosoft Mobile Developer
 
Il pattern mvvm come strutturare al meglio il vostro progetto
Il pattern mvvm come strutturare al meglio il vostro progettoIl pattern mvvm come strutturare al meglio il vostro progetto
Il pattern mvvm come strutturare al meglio il vostro progettoMicrosoft Mobile Developer
 
Lens app trasformare il telefono in una fotocamera
Lens app trasformare il telefono in una fotocameraLens app trasformare il telefono in una fotocamera
Lens app trasformare il telefono in una fotocameraMicrosoft Mobile Developer
 

Mehr von Microsoft Mobile Developer (20)

Intro to Nokia X software platform 2.0 and tools
Intro to Nokia X software platform 2.0 and toolsIntro to Nokia X software platform 2.0 and tools
Intro to Nokia X software platform 2.0 and tools
 
Lumia App Labs: Lumia SensorCore SDK beta
Lumia App Labs: Lumia SensorCore SDK betaLumia App Labs: Lumia SensorCore SDK beta
Lumia App Labs: Lumia SensorCore SDK beta
 
Healthcare apps for Nokia X and Nokia Asha
Healthcare apps for Nokia X and Nokia AshaHealthcare apps for Nokia X and Nokia Asha
Healthcare apps for Nokia X and Nokia Asha
 
Push notifications on Nokia X
Push notifications on Nokia XPush notifications on Nokia X
Push notifications on Nokia X
 
DIY Nokia Asha app usability studies
DIY Nokia Asha app usability studiesDIY Nokia Asha app usability studies
DIY Nokia Asha app usability studies
 
Lessons learned from Nokia X UI reviews
Lessons learned from Nokia X UI reviewsLessons learned from Nokia X UI reviews
Lessons learned from Nokia X UI reviews
 
Location based services for Nokia X and Nokia Asha using Geo2tag
Location based services for Nokia X and Nokia Asha using Geo2tagLocation based services for Nokia X and Nokia Asha using Geo2tag
Location based services for Nokia X and Nokia Asha using Geo2tag
 
HERE Maps for the Nokia X platform
HERE Maps for the Nokia X platformHERE Maps for the Nokia X platform
HERE Maps for the Nokia X platform
 
Nokia In-App Payment - UX considerations
Nokia In-App Payment - UX considerationsNokia In-App Payment - UX considerations
Nokia In-App Payment - UX considerations
 
Introduction to Nokia Asha SDK 1.2 (beta)
Introduction to Nokia Asha SDK 1.2 (beta)Introduction to Nokia Asha SDK 1.2 (beta)
Introduction to Nokia Asha SDK 1.2 (beta)
 
UX considerations when porting to Nokia X
UX considerations when porting to Nokia XUX considerations when porting to Nokia X
UX considerations when porting to Nokia X
 
Kids' games and educational app design
Kids' games and educational app designKids' games and educational app design
Kids' games and educational app design
 
Nokia X: opportunities for developers
Nokia X: opportunities for developersNokia X: opportunities for developers
Nokia X: opportunities for developers
 
Lumia App Labs: Nokia Imaging SDK 1.1
Lumia App Labs: Nokia Imaging SDK 1.1Lumia App Labs: Nokia Imaging SDK 1.1
Lumia App Labs: Nokia Imaging SDK 1.1
 
Intro to Nokia X software platform and tools
Intro to Nokia X software platform and toolsIntro to Nokia X software platform and tools
Intro to Nokia X software platform and tools
 
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultations
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultationsLumia App Labs: Lessons learned from 50 windows phone 8 design consultations
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultations
 
Windows Phone 8 speech: parliamo con la nostra app
Windows Phone 8 speech: parliamo con la nostra appWindows Phone 8 speech: parliamo con la nostra app
Windows Phone 8 speech: parliamo con la nostra app
 
La pubblicazione di un'applicazione sullo store
La pubblicazione di un'applicazione sullo storeLa pubblicazione di un'applicazione sullo store
La pubblicazione di un'applicazione sullo store
 
Il pattern mvvm come strutturare al meglio il vostro progetto
Il pattern mvvm come strutturare al meglio il vostro progettoIl pattern mvvm come strutturare al meglio il vostro progetto
Il pattern mvvm come strutturare al meglio il vostro progetto
 
Lens app trasformare il telefono in una fotocamera
Lens app trasformare il telefono in una fotocameraLens app trasformare il telefono in una fotocamera
Lens app trasformare il telefono in una fotocamera
 

Kürzlich hochgeladen

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 

Kürzlich hochgeladen (20)

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 

Asha Idea to App: Imaging Effects and Scaling

  • 1. Asha Idea to App: Imaging Michael Samarin Director, Developer Training and Evangelism Futurice @MichaelSamarin
  • 3.
  • 4.
  • 6. Form videoForm; Item videoItem; Player player; VideoControl videoControl; player = Manager.createPlayer("capture://image"); //player = Manager.createPlayer("capture://video"); player.prefetch(); player.realize(); player.start(); videoControl = (VideoControl)player.getControl("VideoControl"); videoItem = (Item)videoControl.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, null); videoForm.append(videoItem);
  • 7. byte[] imageBytes = videoControl.getSnapshot(null); Image image = Image.createImage(imageBytes, 0, imageBytes.length); ImageItem imageItem = new ImageItem("", image, Item.PLAIN, ""); videoForm.append(image); String fileName = System.getProperty("fileconn.dir.photos”) + "CapturedImage.jpg"; FileConnection file = (FileConnection) Connector.open(fileName, Connector.READ_WRITE); if (!file.exists()) file.create(); OutputStream out = file.openOutputStream(); out.write(imageBytes); out.close(); file.close();
  • 8. byte[] imageBytes = videoControl.getSnapshot(null); //byte[] imageBytes = videoControl.getSnapshot(“width=640&height=480”); Image image = Image.createImage(imageBytes, 0, imageBytes.length); ImageItem imageItem = new ImageItem("", image, Item.PLAIN, ""); videoForm.append(image); String fileName = System.getProperty("fileconn.dir.photos”) + "CapturedImage.jpg"; FileConnection file = (FileConnection) Connector.open(fileName, Connector.READ_WRITE); if (!file.exists()) file.create(); OutputStream out = file.openOutputStream(); out.write(imageBytes); out.close(); file.close();
  • 9. RecordControl recordControl; recordControl = (RecordControl)player.getControl("RecordControl"); recordControl.setRecordLocation(System.getProperty("fileconn.dir.photos”) + "CapturedVideo.mp4"); recordControl.startRecord(); ... ... recordControl.stopRecord();
  • 10. • Displaying live camera viewfinder; • Taking snapshot; • Recording video;
  • 11.
  • 12.
  • 13. ImageScaler imageScaler = new ImageScaler(sourceImageFilePath, destinationFilePath); imageScaler.addListener(this); Integer requestId = new Integer(imageScaler.scaleImage(newWidth, newHeight, true)); . . . public void scaleFinished(int requestId, int result) { ... }
  • 14.
  • 15. MediaProcessor mediaProcessor = GlobalManager.createMediaProcessor(JPEG_TYPE); mediaProcessor.addMediaProcessorListener(this); ... mediaProcessor.setInput(inputStream, MediaProcessor.UNKNOWN); ... mediaProcessor.setOutput(byteArrayOutputStream); ImageEffectControl imageEffect = (ImageEffectControl) mediaProcessor.getControl( "javax.microedition.amms.control.imageeffect.ImageEffectControl"); imageEffect.setPreset("monochrome"); imageEffect.setEnabled(true); mediaProcessor.start(); ... public void mediaProcessorUpdate(MediaProcessor processor, String event, Object eventData){ ... }
  • 16.
  • 17. • Image Scaling API • Image Effects with APPS
  • 18. © 2014 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. The information herein is for informational purposes only and represents the current view of Microsoft* 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. *Microsoft refers to Microsoft Corp. and its affiliates, including Microsoft Mobile Oy, a wholly-owned subsidiary. The Nokia Devices and Services business is part of Microsoft Mobile Oy. THANK YOU!