W
W
wolfak2015-12-11 19:41:58
JavaScript
wolfak, 2015-12-11 19:41:58

Image change in Windows and Windows Phone?

Good evening. I'm developing a Windows Phone app using WinJS (HTML) and I've come across three issues. Using the picker.pickSingleFileAndContinue function, I call the file selection dialog.
After the file is selected, the following function is called:

function continueFileOpenPicker(eventObject) {
var files = eventObject[0].files;
var filePicked = files.size > 0 ? files[0] : null;
if (filePicked !== null) {
 document.getElementById("CamPageCont").removeChild(document.getElementById("sendpostfile"));

var DivShowCamCont = document.createElement("div");
DivShowCamCont.setAttribute("align", "center");

var ShowCamCont = document.createElement("img");
ShowCamCont.setAttribute("id", "ShowCamCont");
ShowCamCont.setAttribute("align", "center");

var imageBlob = URL.createObjectURL(filePicked);
ShowCamCont.src = imageBlob;

DivShowCamCont.appendChild(ShowCamCont);
document.getElementById("CamPageCont").appendChild(DivShowCamCont);

var ButtEditPost = document.createElement("div");
ButtEditPost.setAttribute("id", "ButtEditPost");
ButtEditPost.innerHTML = "Edit";

document.getElementById("CamPageCont").appendChild(ButtEditPost);

document.getElementById("ButtEditPost").onclick = function (eventInfo) {
// TODO: Вызов функции редактирования
}

1. How can I call a function to change a photo? For example, I have a Lumia 535 and there is an excellent Lumia photo editor. (I don’t want to do my own cropping of photos, reversal of photos and standard filters that are quite satisfactory).
2. How to extract information about the latitude and longitude of the place where the photo was taken from the meta information of the image? I found this article, but I did not understand how to change my function.
https://msdn.microsoft.com/en-us/library/windows/a...
3. How can I determine the file type that was selected? Those. image or video? Maybe filePicked contains the type as well?
Thank you very much for your help.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question