POST
|
Hi, To fix the image rotation issue, you may need two components: ExifInfo and ImageObject. In general, ExifInfo helps you to get and set EXIF data of the image and ImageObject helps you to `edit` image. You can get more information about these two components in the documentation. The basic idea is very simple. The issue occurred because the image has wrong orientation. So the only thing we need to do is to rotate it back. The question is how many degrees we should rotate so that the image is in the right direction? You can easily get the degree from the EXIF of the image. After that, depending on the platforms, you can calculate the degree you need to rotate back. In details, following code step by step: Step 1. defined ExifInfo and ImageObject in your code ImageObject { id: imageObject } ExifInfo { id: exifInfo } Step 2. use the ExifInfo get the how many degrees you have rotated the image exifInfo.load(path); var o = exifInfo.imageValue(ExifInfo.ImageOrientation); var exifOrientation = o ? o : 1; var exifOrientationAngle = 0; // this is want we want switch (exifOrientation) { case 3: exifOrientationAngle = 180; break; case 6: exifOrientationAngle = 270; break; case 8: exifOrientationAngle = 90; break; } Step 3. based on the platforms, calculate the degree you need to rotate the image back to fix the orientation var rotateFix = 0; // this is want we want switch (Qt.platform.os) { case "android": rotateFix = -exifOrientationAngle; // exifOrientationAngle comes from step2 break; case "ios": rotateFix = -videoOutput.orientation; if (camera.position === Camera.FrontFace && isPortrait) { rotateFix = (-videoOutput.orientation + 180) % 360; } break; default: rotateFix = -videoOutput.orientation; break; } Step 4. use the ImageObject to rotate the image file and save it back to the original image if (rotateFix !== 0) { imageObject.load(path); //load image into imageObject imageObject.rotate(rotateFix); // fix the rotation imageObject.save(path); // save the image data back to the image file, remember this will remove the exifinfo } Hope this would help!
... View more
04-18-2018
05:21 PM
|
0
|
0
|
253
|
POST
|
Hi, To install and run the app on iOS devices is very easy. If you just want to test the app, I suggest you use AppStudio Player. You can know more for AppStudio Player by watching the video from our workshop Chapter 3.1 Testing, Building, and Distributing Your Apps | Testing (1 of 5) - YouTube. In this way, you don't have to do the cloud make for your apps every time. All you need to do is loading the app inside the player. However, if you really want to install the real app, you can do the build on the fly and installed the app via AppStudio OTA. Here are the steps: - Build the app - On iOS device, use browser to visit the website https://appstudio-ota.arcgis.com/#/ and log in with your account - Install the app by clicking the "install" button via AppStudio OTA This will install the app for you on iOS devices. Hope this will help!
... View more
12-04-2017
10:51 AM
|
0
|
1
|
368
|
POST
|
Hi Kristen, Glad to help you about this issue. If you simply set username and password in the appinfo.json without any code change, it would not help you to generate token automatically. This is because the app always tries to read username and password from app's settings file (which is different from appinfo.json). The appinfo.json, on the other hand, is used to configure the app when you initialize it. In details, the appinfo.json is used to initialize the app (you cannot change in the app). The settings file is the file which saved all information you want to change and keep when you open the app next time. In your case, you want to use a secured service without asking users to input the username and password. This is easy to do by using the template. Just do the following things: - set username and password in the appinfo.json (which you have already done) - Inside the function generateToken(), using var user = app.info.propertyValue("username","");
var pwd = app.info.propertyValue("password","");
var obj = {"username":user, "password":pwd, "f":"json", referer: "http://www.arcgis.com"/*, expiration:"1"*/}; This will read the username and password from the appinfo.json and try to use them to generate token. Hope this will help! Best, LG
... View more
03-30-2017
01:20 PM
|
1
|
1
|
421
|
POST
|
The highlighted line should be "domainTypeIndex = getTypeIndex(modelData["domain"]["type"]);" Please change it and try again!
... View more
01-13-2017
12:59 PM
|
1
|
0
|
474
|
POST
|
Hi Anthony, To fix the issue, please go to QuickReport\pages\AttributesPage.qml, near the line 148, change the highlighted code to domainTypeIndex = getTypeIndex(modelData["domain"]["type"]); After that, it should look like: Hope this will help!
... View more
01-13-2017
10:36 AM
|
0
|
2
|
474
|
POST
|
Hi Massimiliano, Please check the QuickReport->controls->FeatureServiceManager->function addAttachement(). This might be a good example for this question. In this function, we defined an object "obj" and used it in NetworkRequest : var obj = {"attachment": "@"+filePath, "f": "json"};
addAttachmentNetworkRequest.send(obj); As can be seen, we contained file path for the image in this obj and sent it by calling send() function. I think the similar logic could be used to send images to a private server. Hope this helps, LG
... View more
12-28-2016
01:01 PM
|
1
|
1
|
682
|
POST
|
Since we redesigned the template and removed runtime in the new QuickReport, secured feature service is not currently supported. However, this issue has been fixed recently. If you would be willing to test it, please leave your email address and we can send you the latest template.
... View more
12-21-2016
09:13 AM
|
1
|
1
|
437
|
Title | Kudos | Posted |
---|---|---|
1 | 03-30-2017 01:20 PM | |
1 | 01-13-2017 12:59 PM | |
1 | 12-28-2016 01:01 PM | |
1 | 12-21-2016 09:13 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|