QML Image not able to open local image files in iOS - ios

I am trying to open the image files from iOS app local storage which were created using openCV. I have already tried to use file:/// also I used rootContextProperty. The app always says
QML QQuickImage: Cannot open: file://users/amitimac/Library/Developer/CoreSimulator/Devices/C62DB1E2-F6AD-4A94-9E08-0DBA4E45E718/data/Containers/Data/Application/1FB67106-7647-4739-A59B-3D61EDF29718/Documents/Documents/test.png
But, I can both read and write to the local storage of the iOS simulator in C++, but not in QML.
I am using QStandardPaths :: writableLocation(QStandardPath :: DocumentsLocation) for writing the image files and I have also tried the Pictures location.
Please help if you can.

Well, I solved this issue. The actual problem was with the JPG files. When I converted them to PNG, the whole thing started to work.

Related

Autotouch webserver with images

I'm using autotouch (http://autotouch.me/) on a jailbroken iphone with iOS 8.3 and I'm using the webserver to edit my script. I want to load screenshots taken with the app on my computer via the webserver, but I am having trouble.
I'm taking screenshots using with:
screenshot ("images/screenshot1.png", nil);
which works and puts the screenshot into the images/ directory inside of the autotouch app. But when I try to view the image, it takes me to IP:8080/file/edit?path=/images/screenshot1.png.
This page gives me a Cocoa 261 error, presumably because it is expecting a lua file instead of a png.
Is there any way to view images on the webserver?
Autotouch only recognizes .bmp images.
Start by saving your images in .bmp format. You can rename any of the files simply by removing the .jpg and adding .bmp
I know for a fact you can view the images from the WebServer. Im assuming the cocoa error will go away after that.

How to display a .pdf on BrowserField in Blackberry 7

I'm trying to display a .pdf file on a browserfield but somehow it's not opening in my app however it works fine with .txt files.
I'm reading .pdf file from local storage and using
browser_field.displayContent(fileinbytes, "application/pdf", "");
but it's displaying a player like image on the screen and not actual result.
If anyone has any idea about the same, i'm all ears.
As far as I can tell this isn't possible (browserfield doesn't even fully support javascript).
This post suggests that you can view it via Google, which wouldn't be from local storage.
(Un)luckily blackberry is very similar to Java ME, so you can often use those libraries as is. Apparently JPedal can render pdf files for J2ME, and might be worth a look.
Other than that, I don't think you'll have much hope. Good luck

Read .las (LiDAR data) in iOS

I am making an app render the cloud points on different layer. For now I am consuming the data as .txt file converted from .las file. My question is: is there a way or lib to directly consume the .las format on iOS device? I searched about the libLAS (http://www.liblas.org/) but don't think it will work.
Thanks
Try LASlib of LAStools. It compiles without dependencies and also reads compressed LAS aka LAZ.
http://github.com/LAStools/LAStools/tree/master/LASlib

Cross platform way to get icon of firefox exe

I'm trying to get the path to the default firefox executable cross platform.
I tried the way recommended here:
https://stackoverflow.com/a/24056586/1828637
However its not working on mac os or linux
on mac it shows this: http://i.imgur.com/xu5GrF8.png
on linux (tested on ubuntu 14) it shows this: http://i.imgur.com/QxWKxbH.png
I was hoping to get the .xpm on linux and the .icns on mac os and the .ico on windows which is the container file, meaning like not just .ico of the single 64x64 image but contain all files please.
Thanks
Your title and question ask two different things, which is a bit confusing. I am not clear on if you want just a way to find the Firefox executable, or a way to extract the currently used (or default?) icon from Firefox.
Icon files:
If you are just looking for a URL to use within Firefox, they should be located at:
chrome://branding/content/icon128.png
chrome://branding/content/icon64.png
chrome://branding/content/icon32.png
chrome://branding/content/icon16.png
They do not appear to exist in .ico files within the Firefox distribution. In fact there are only 4 .ico files in the entire distribution. They are all within the browser/omni.ja file at (windows assumed as primary based on your statements in prior questions):
chrome\browser\skin\classic\browser\customizableui\customizeFavicon.ico
chrome\browser\skin\classic\aero\browser\customizableui\customizeFavicon.ico
chrome\browser\skin\classic\browser\preferences\in-content\favicon.ico
chrome\browser\skin\classic\aero\browser\preferences\in-content\favicon.ico
omni.ja files are just zip format files with the extension changed to .ja instead of .zip. You can change the file extension back to .zip and read it with any appropriate archive handler.
The chrome:// URLs are:
chrome://skin/customizableui/customizeFavicon.ico
chrome://skin/preferences/favicon.ico
I think you can only get access to two of them at a time through chrome://skin/ depending on if you are using aero. If you really need access to both you could use nsiZipReader to open the actual omni.ja file.
Executable file:
You already had a batter way to get the executable file. From your comment it is:
FileUtils.getFile('XREExeF', []);

Can i save an image to the native Photos directory on an Ipad?

I've got my camera saving images fine to the app path, but my client wants to be able to access the photos from the photos directory (the path that images appear in when you use the native camera apps on the ipad)... I seem to get a "File I/O Error" if i try to save to the "///var/mobile/Media/Photos/" directory, which seems to be the location... is it possible? or is there no security or something involved with that?
I've never used it, but you want to use the CameraRoll class. It should do what you want, and seems straight forward to use based on it's simple/short API.
Here's an Adobe cookbook example that uses the CameraUI class as well.

Resources