iPhone App to generate thumbnail images for the image obtained via camera or photo gallery - iphone

My app allows user to obtain picture/image from camera/photo gallery and then the app will upload the images to remote storage. Since the thumbnail images of those images will be used in some scenarios, I need to generate the thumbnail images.
The questions are
should the thumbnail images be generated by the app at the time when the original/raw image is obtained?
is it achievable to upload a raw image and at least 2 of its thumbnail images at the same time from the app to the remote storage - let's say its Amazon S3 or Google App Engine
is there any sample code out there that does the image transformation on iPhone?

I think you should, and put a progress indicator on top to tell your user that "please wait, I'm generating thumbnails".
I don't think at the same time is appropriate for you. Instead, you should try to upload them (2 thumbnails and 1 raw) in a serial manner. That is, "try 1st thumbnail, if succeed, try 2nd thumbnail...",since the internet connection for a mobile device like iPhone could be unstable. Requests-timing-out does happen, therefore it's better to always make sure you have finished the previous request before you start the next one.
I think three20's TTThumbsViewController (or TTPhotoViewController) has done a good job in transforming original photos into square-shaped thumbnails. Maybe you should take a look at their source code.
btw, as for uploading photos to servers, I once used the ASIFormDataRequest to post my photos to a server. It worked pretty well.
Hope it helps. :-)

Related

Flutter Menu App that gets pictures from firebase

I have a flutter app that is a menu for a restaurant. Now the problem is that I want to get the pictures from firebase. Currently, if you open the app, the pictures take time to load and you can see that with your eyes, it is a bit annoying and not practical regarding bandwidth data usage.
Is there any chance I can cache the images when I get them from firebase and than appear instantly? I request the links of the images once the page is open using a future and display them with a CachedNetworkImageProvider() with the image URL but that still takes time to load the images. Is there a way to download all the data in the firebase at once when you open the app and not check every time you open the app?
for all apps that require fetching images from a remote location, what i have been doing so far is download the image locally and use the local image instead of the remote one if it exists locally, from my knowledge cachedNetworkImage only caches the image after fetching when the app is currently running and refetches the image when the user restarts the app.
Please if you do find another way to cache images that would be cool and remove a lot of boiler plate code, please do post it, thanks.

Phonegap App lost images on update, recovering from the camera roll

I have an app where users take images and they are saved along with user notes. Per the following link this is what I was using to save the images to the app. The issues is when some users update the app the images are lost.
Phonegap - Retrieve photo from Camera Roll via path
per the bosses instructions the users aren't allowed to browse the gallery for images as they are being used as proof of work performed (small company, 5-12 employees using the app).
is there any way for iphone to relay back to the app the actuall image location on the camera roll like android does? Then I can just save the URI to the database and call it when the form is submitted...
Thanks
You need to use
window.resolveLocalFileSystemURI()
to convert the filelocation to a fileentry or else your filepath will contain the App UUID which changes when you update/deploy your app.

Want to improve image upload speed from my iphone app to my web server based on window

I am doing research on speed of photo upload from my iphone application. But I am not able to find out anything over net. I have tried to upload a photo using ASIHttpRequest and also using NSURLConnection.
But I have notice my code takes lots of time to upload a captured photo from camera to my server while facebook does it withing number of seconds about in 20-30 seconds. my code takes about 4 minutes to upload.
I do compress image at client side and then doing upload, but that also take more time then facebook app.
Is there anyone have idea regarding this?

How to save a large (60mb+) image to photo library?

I know the various ways to save a UIImage to the photo library:
UIImageWriteToSavedPhotosAlbum
ALAssetsLibrary
However, my images are HUGE (60mb+), so bringing them into memory is not possible. I can download the images by streaming them to disk, and even use imageWithContentsOfFile to take a peek (although that is kind of unnecessary given screen size).
But I want the user to be able to save these images for later. Is there anyway for me to get these large images into the photo library? Do I just have to keep them stored locally inside the app sandbox?
I believe that there is no point at storing them at the photo library, since it is designed to be viewed on the device and theres no point at viewing an image so big. If you want to let the user see the image then i suggest you create a preview and save THAT version into the photo library. If you want to let the user transfer them from the device to the computer there is a special folder in your app bundle which will allow those pictures to appear when using itunes and selecting your application. then he can transfer those pictures to his computer. Also could you elaborate on the characteristics of the images? format, dimentions, purpose, etc.

creating iphone app for existing site. need advice about the data I'm downloading

I'm building an iPhone app for existing site (a local news site)
Main page with articles headers, when click on them you move to the article page. Simple.
This is the first time I'm building such type of app.
I have 3 general questions, just to make sure :
For the iphone, Do we need to
re-create the website article's
pictures for the iphone ? or there
is some programming tool that on the
fly make the files looks better on
the iphone ? or maybe, there is some
technique that creates one artice
picture that looks right both for
the server and the iphone ?
Usually, Do you need to create
special data channels from the
iPhone webservice ? or programmers
just use the existing rss channels
of the webserver ?
If someone know nice artice about
this stuff, It will help a lot. just
see what other are doing.
thanks.
You can see the intent Media apps, these apps are working like what you want your app to.
1) You're better off creating mobile versions of the images. You can do image processing on the iPhone, but you'll have to have the original and that makes the whole thing pointless (ie. you have to download the whole thing.) Generate a mobile thumbnail when those are uploaded on the server.
2) RSS will do. There's a very good tutorial at cocoadevblog.com about approaching such a task (I guess this covers 75% of the work you have to do)
3) Check 2) ;-)
if your download image is bigger the the thumbnail you are trying to display,
then the problem is in your code that change the image size. check carefully what are you doing to the image after downloading it.
I would recommend to create square thumbnails of your pictures at the server level. This will allow you to easily position in the iPhone screen, plus you will not need to download the whole image from the server.
nnahum