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

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
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
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
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"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
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"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
 
"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
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
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
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
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
 
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
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
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
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 

Kürzlich hochgeladen (20)

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
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
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
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
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
 
"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...
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"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
 
"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
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
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
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
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!
 
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
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
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
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 

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!