I am working on an app for iPad where I want to have lets say 100 jpg's in a folder.
They could be named like 01.jpg, 02.jpg etc.
In my app I like to browse those images and when clicking on one of them I need the name of the image to be able to send some data over the network (the data part works fine).
I tried to use UIImagePicker but I found out there are no name connected to the actual image.
Then I made another approach where I have a number of pages where I have buttons and here I load in the images which works fine as long the are a part of the recourse of the project...
But here comes the real problem.
The user of the app should be able to change those images over time without recompiling the app.
So I do look for a way to have a folder where the user can place/replace images with the names 01.jpg etc and the app to use those updated images.
Ideas are very welcome.
Wiljan
I am not sure that I understand what you mean, but You can save images in your application documents folder. You can find more details at:
http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/StandardBehaviors/StandardBehaviors.html#//apple_ref/doc/uid/TP40007072-CH4-SW6
You can also use NSFileManager to copy files.
what I suggest to do is :
put default images on project resources.
At first start, copy files to documents folder.
always use images from documents folder.
Related
I am trying to create an ios Wallet Event Ticket. I managed to give all the info I needed to create the pass.json and I have signed and zipped it. When I try to open this on a Mac, I am able to see the pass in the preview. When I email it and try to open it from an iPhone, the screen just goes to the main screen as if it crashed.
After lots of experimentation I found out that if I add at least one of t he images (icon) I am able to see it in preview and add it to the Wallet.
Since I do not care to add any image, this seems way too much just to make it work.
The question is, are images required in the pass? And if not, why does it not work without them. I repeat, it was displayed on Mac preview either with or without the image file.
Yes! manifest.json required the image correctly, moreover the pass.json also need to ensure everything is correct. Some elements must add in json for iPhone open, for example:serialNumber, webServiceURL, authenticationToken, relevantDate
Also, iPhone open .pkpass as difference format with mac. In my case , the signature file is wrong will also make the .pkpass file cannot open in iPhone.
In my job of e-commerce i have to save images from MFG. sites to upload them to my client webpage, sometimes when product came like apple i6 there are hundreds of images in product description
so i want to save all images from mfg url with one click
For example:
URL- http://www.gsmarena.com/samsung_galaxy_a9_%282016%29-pictures-7641.php
it have 7 images, so i wanna get all images downloaded in single click
image links:
http://cdn.gsmarena.com/imgroot/reviews/15/apple-iphone-6s/-347x151/thumb.jpg
http://cdn2.gsmarena.com/vv/bigpic/samsung-galaxy-a9-2016-.jpg
http://cdn2.gsmarena.com/vv/bigpic/samsung-galaxy-a9-2016-.jpg
http://cdn2.gsmarena.com/vv/pics/samsung/samsung-galaxy-a9-2016-6.jpg
http://cdn2.gsmarena.com/vv/pics/samsung/samsung-galaxy-a9-2016-7.jpg
http://cdn2.gsmarena.com/vv/pics/samsung/samsung-galaxy-a9-2016-5.jpg
http://cdn2.gsmarena.com/vv/bigpic/samsung-galaxy-a8-.jpg
Maybe this way?
Image Picker Plugin for Firefox
Seems it does the same job without any installation (but plugin installation).
Not sure if it is, what you are looking for. But I tryed it and found an easy option for you.
Use the tool: jdownloader2
Copy the link of your desired URL and paste it into the link collector. It gathers automatically all the pictures on that page and downloads it for you. All images with a single click...
The idea is that i will create a file in the app and store some data in it.
I want for the end user to be able to download that file from the iOS device to his mac/pc.
Is this somehow possible? Where should i put the file for the user to be able to download it via itunes?
Here is good tutorial you can use:
Tutorial
It is important to know, that in iOS, when your user needs to create file, you do not need to care where to save it.
Another possibility for you might be to avoid saving data as file. For example, if your data is picture:
UIImage send to email
I'm trying to create live tiles in my app by using BitmapRender (in Windows 8.1) to create an image from a user control, which I then want to add as my live tile image.
Creating the image works perfectly, and I store it in the app's roaming folder. However, I can't get the image to add to the live tile when created this way. The odd thing is that if I copy my generated file into the project and then try to attach it to the live tile it works (so the image must be correctly formatted/size, etc.); and if I copy a random image into my roaming folder and set that as the live tile image it also works (meaning I am able to use a file in the roaming folder to set the tile image)...so that means I am referencing the file location correctly, and the image itself is capable of being used on a live tile...so why doesn't it work?
I have created a sample project (link below) that illustrates that my live tile creating code works (with an image stored in the project), and also that I can successfully create an image from a UI control and store it in the roaming folder (FWIW I've tried using different folders with no change in behaviour).
Is there something I'm missing? Any insight or help would be greatly appreciated.
Project is in VB.net, but I can figure out answers in C# if that's easier.
Sample project to illustrate the issue
The trouble is that you're attempting to use an absolute file path to reference the image, which is not supported. If you look in the tile schema, specifically at the page for the element, you'll see that the src must be an URI using http[s]://, ms-appx:///, or ms-appdata:///local for Windows Store apps. The fact that you can use a relative in-package path of /livetile.png is a bit of a fluke, as that's defaulting to ms-appx:///livetile.png.
What you need to do, then, is just use this for a filepath:
filepath = "ms-appdata:///local/livetile.png"
I tried this in your sample and it worked fine. Do note that only the local folder is supported here, not roaming. This is primarily because roaming appdata is limited to 100K to begin with, and dropping tile images in there would often quickly fill your quota. You'll want to then generate the image locally on each device (which would make sense also because you can then take the current scaling into account).
I've been trying to figure this one out for about a week now and just
can't come up with a good solution. So, I figured I would see if anyone could help me out. Here's one of the links that I'm trying to scrape:
http://content.lib.washington.edu/cdm4/item_viewer.php?CISOROOT=/alaskawcanada&CISOPTR=491&CISOBOX=1&REC=4
I right-clicked to copy image location.
This is the link that is copied:
(Can't paste this as a link because I'm new)
http:// content (dot) lib (dot) washington (dot) edu/cgi-bin/getimage.exe?CISOROOT=/alaskawcanada&CISOPTR=491&DMSCALE=100.00000&DMWIDTH=802&DMHEIGHT=657.890625&DMX=0&DMY=0&DMTEXT=%20NA3050%20%09AWC0644%20AWC0388%20AWC0074%20AWC0575&REC=4&DMTHUMB=0&DMROTATE=0
There is no clear image URL being displayed. Obviously that's
because the image is hidden behind some type of script. Through trial and
error I found that I can put ".jpg" after the "CISOPTR=491" and then the link becomes an Image URL. The problem is that this is not the high-resolution version of the image. To get to the
high-resolution version I have to change the URL even more. I found a lot of articles #Stackoverflow.com to mention trying to build a script using curl and PHP, I have even tried a few of them with no luck. "491" is the image number and I can change that number to find other images in the same directory. So, scraping a sequence of numbers should be pretty easy. But I'm still a noob at scraping and this one is kicking my butt. Here's what I've tried.
Get remote image using cURL then resample
also tried this.
http://psung.blogspot.com/2008/06/using-wget-or-curl-to-download-web.html
I also have Outwit Hub, and Site Sucker, but they don't recognize the URL as an image file and fo they just pass right ove it. I used SiteSucker overnight and it download 40,000 files and only 60 were jpegs, none of which were the ones I wanted.
The other thing I keep running into, is the files I have been able to download manually, the filename is always either getfile.exe or showfile.exe and then if I manually add ".jpg" as the extension I can view the image locally.
How can I reached the original high-res image file, and automate the download process so that I can scrape a couple hundred of these images?
I right-clicked to copy image location. This is the link that is
copied:
You noticed the title has ".exe" in there. Look at the stuff in the query string:
DMSCALE=100.00000
DMWIDTH=802
DMHEIGHT=657.890625
DMX=0
DMY=0
DMTEXT=%20NA3050%20%09AWC0644%20AWC0388%20AWC0074%20AWC0575
REC=4
DMTHUMB=0
DMROTATE=0
Strongly implies the original source of this image is in a database or something and it is being passed thru a server-side filter (not sure if that is what you meant by "some kind of script"). Ie, this is dynamically generated content, not static, and the same caveats apply as would to dynamic text content: you have to figure out what instructions to provide the server to get it to cough up what you want. Which you pretty much have in front of you...if SiteSucker or whatever won't deal with it properly, scrape the address yourself using an HTML parser.