SlideShare une entreprise Scribd logo
1  sur  18
Télécharger pour lire hors ligne
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!

Contenu connexe

Similaire à Nokia Asha from idea to app - Imaging

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
 

Similaire à Nokia Asha from idea to app - Imaging (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
 

Plus de 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
 

Plus de 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
 

Dernier

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
[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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
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
 

Dernier (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
[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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 

Nokia Asha from idea to app - Imaging

  • 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!