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.
Related
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.
I have a file uploader for users to store images, which I'm saving content to a folder within the application data directory (app.getPath('userData')). This all works fine.
When I attempt to load the image using a basic image tag, with the src pointing to the correct location within the application data directory, it fails to render.
This only occurs after I've packaged the app using electron-forge (make & package). I've only attempted to make for OS-X (darwin x-64). I'm guessing it has something to do with asar, but I can't seem to get this working. I've attempted to use the file protocol for the image source too.
Any idea how to correctly do this?
I found the easiest way is to serve all content up from a server bound to localhost
I am attempting to use Imagemagick to manipulate images that are uploaded by a user. Right now I have a simple set of Imagemagick.convert[ ] commands server side that preform a variety of tasks on the uploaded image. My problem comes from Imagemagick needing the file data to be read into meteor and not from a url. What I end up doing is writing the uploaded file to the /public folder where Imagemagick is able to manipulate the image. However because the list of Imagemagick.convert commands (saving and writing to /public), the application keeps refreshing, breaking up the processes and sending it into an infinite refreshing cycle. I don't think assets is a viable solution, but I need some folder that I can write to in meteor that will not interrupt the various Imagemagick processes through a refresh. I have tried the .folder for a hidden folder, but meteor gives me an error: "You can’t use a name that begins with a dot “.”, because these names are reserved for the system. Please choose another name." Any thoughts?
#Nate I wrote a little example app that solves this problem by using a temporary directory (as others have suggested):
https://github.com/ideaq/image-uploads
My solution gives you:
Easy image uploading in any Meteor app
Images are re-sized to Thumbnail, Mobile Optimised and Full-size Original
Images are uploaded to AWS S3 for CDN delivery (scalability and speed)
A thumbnail of the image is displayed on to the user without refreshing the page
if you found a better way of doing image uploads in meteor, please share! thanks. :-)
I am having a real hard time understanding how to embed many images and sounds in an iPhone app. When I say embed, I mean I want the images and sounds to be downloaded with the app, and some of those images will appear when the app is run. Other images are just saved in the app's disk space, so that when a user presses a button, the image or sound will be accessed and displayed or played.
I have read tutorials on using 'core data' and such, but that only seems like a way to create objects that can be used to reference such data items, or for storing small files as binary data. Can someone please tell me how in xcode I can specify a directory of images and .mp3s to be loaded onto a phone with my app, and how I can then call those media with code?
Some example code for the following would completely solve my problem:
An app is loaded onto a phone, and it contains 3 buttons. If the user presses button #1, a sound is heard. Button #2 plays a different sound, and button #3 changes a UIImageView to a different picture. (this isn't a homework assignment or something, but if I could code this example, I could do everything I need to in my app and understand the process)
Thanks!
I mean I want the images and sounds to be downloaded with the app
Simply add the images and sounds to your project. Make sure you specify (in the Add Files to Project dialog) that they are to copied into the project and that they are to be part of the target. The result will be that the images and sounds will be built into your app (in what is called its bundle, in particular the main bundle - see the NSBundle docs). You can then fetch them out, as needed, in code. For example, to fetch an image, use imageNamed:. To refer to a sound, refer to the file as a resource within the main bundle.
Other images are just saved in the app's disk space
That is a completely different matter. You will have to get the images from somewhere while the app runs. There is no way to have the user download the app and the image end up in the app's disk space: the app must populate its disk space, in real time, as the app runs. At the time the user downloads the app, the associated disk space, outside the app bundle itself, will be empty.
For images, see the responses to this question.
Sound is similar to images, but is loaded differently, this tutorial show how to load and play sounds.
For files that are saved after the app is installed, you will need to download and save those files in your code. For starters, see Apple's guide to the iOS file system
I am making an iPad application (iOS 5.0/5.1 with ARC and storyboard) for which I need to download an image or sound file from my server and then use it as background for all the screens of my application. I was thinking of keeping a placeholder image/audio file bundled within my application which I will refer to within the storyboard. Then when I get the file from the server, I can replace that image with the one coming from the server. However, I'm not sure if this can be done based on the directories that the app has access to.
Pls let me know if you can direct me whether it's possible to go down this road? and if yes, then which directory should I be downloading the image files to?
Thanks in advance for your help