QuickReport app, bug? in resizeImage()

403
1
Jump to solution
08-03-2022 04:29 AM
ClubExtreme
New Contributor III

In AddPhotoPage.qml, function resizeImage()   at 199 row,

var fileInfo = AppFramework.fileInfo(path); 
if (!fileInfo.exists) { ...

this returns: qml: Image not found: file:///C:/Users/someuser/ArcGIS/AppStudio/Data/Pictures/IMG_1659523701346.jpg,
but the image exists, and (path) is valid. Further no resizeImage occurs, so when you make photos from the camera, they are not resized.
Tested on windows and android...
Please let me know how to fix it,

Regards!

 

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
ClubExtreme
New Contributor III

Resolved:

As DocumentDialog, choosing from files, also do not resize images, I replace at 161:

        var attachedFilePath = filePrefix + attachmentsFolder.path + "/"+ attachmentfileInfo.displayName

  with

        var attachedFilePath = attachmentsFolder.path + "/"+ attachmentfileInfo.displayName

 

and below 163 add:

app.selectedImageFilePath = attachedFilePath 
var path = AppFramework.resolvedPath(app.selectedImageFilePath)
resizeImage(path)

 

So now the app resize images, choosing from files, further simply copy ready DocumentDialog code to CameraDialog section, replacing its code, and that's all. Now images are resized if they come from camera. Further testing, and if any issues will report here.

Regards

View solution in original post

0 Kudos
1 Reply
ClubExtreme
New Contributor III

Resolved:

As DocumentDialog, choosing from files, also do not resize images, I replace at 161:

        var attachedFilePath = filePrefix + attachmentsFolder.path + "/"+ attachmentfileInfo.displayName

  with

        var attachedFilePath = attachmentsFolder.path + "/"+ attachmentfileInfo.displayName

 

and below 163 add:

app.selectedImageFilePath = attachedFilePath 
var path = AppFramework.resolvedPath(app.selectedImageFilePath)
resizeImage(path)

 

So now the app resize images, choosing from files, further simply copy ready DocumentDialog code to CameraDialog section, replacing its code, and that's all. Now images are resized if they come from camera. Further testing, and if any issues will report here.

Regards

0 Kudos