SlideShare una empresa de Scribd logo
1 de 18
Descargar para leer sin conexión
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!

Más contenido relacionado

Similar a 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
 

Similar a 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
 

Más 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
 

Más 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
 

Último

Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
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
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
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
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 

Último (20)

Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
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
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
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!
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 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!