Solution for display image in library website - asp.net-mvc

In my website, I have a library contain all image of user, I want to display all image in this library. How can I do it?
I have solution but I can’t do it. This’s my solution. I’ll create thumbnail for each image and display it in library. Size of thumbnail is very small, so I don’t worry about performance. If I create thumbnail in my server. It must download, read and resize these images, then it return for my website. This way I feel not good. I have many images, each customer have about hundreds images, size of each image about 1mb or 2mb. I think have no server can handle it. Another way is create thumbnail on client by jQuery, but I can’t do it and my friend talk with me. jQuery don’t handle it. How can I do it for my solution? Hope you understand what I mean

I think you can use pagination if you would like to return million images in a page
so for instance 50 images per page to keep up with your web performance

You need to generate thumbnails on server and show thumbnails in the gallery. When a user clicks on a thumbnail in the gallery, show the full image.

I think your first idea is better. Because you don't want to show the images in actual size and you want to make them smaller. So using their thumbnail is a good solution. If you think this could add some complexity you can make the thumbnails for each image when user uploads them and in your view just use the thumbnails.

Related

Data hiding in Image

I am hiding a text file in an image using http://github.com/anirudhsama it works fine and I could able to extract the text file again back with my program.
But when I programmatically share the image in facebook, twitter and email, that shared image is not decode properly so I'm not getting the file back.
I retrive the image as follows:
UIImage *finalImageWithStegno = [UIImage imageWithContentsOfFile:fileName];
What I suspect is image compression when it is uploaded to the site. A simple way to check this is to hide a message in a cover image (obtain stego image). Upload the image on a website and download it. Compare the original stego image to the downloaded image. If they differ (byte by byte), there's your problem.
From a quick look at the code, it seems the app hides the data in the spatial domain, which is not robust. Your message is directly hidden in the image pixels and if they change (due to lossy compression, blurring, etc), your message will be lost. A solution to this would be to hide the data in the frequency domain. Another solution could be uploading the images with a filetype which doesn't get compressed? I don't know much how sites deal with images so the second suggestion may be impossible.
In any case, if uploading to a site distorts the image, look around for another app which may serve you unless you can code yourself. Then we can get into the specifics. :)
Your algorithm is not robust. Use Transform domain Stegnography to retain the information when its is re encoded. You may choose to embed in DCT coefficients or DWT Coefficients for better robustness.

Image Processing In Ios

I am new to iOS, and I am trying a image on a view. The image in question is large, and fetched from a URL, so to load the view it takes quite some time (almost 5-10 sec).
I don't want to display a place holder and to do some asynchronous call to update the image;
instead, I want image processing similar to how it is implemented in the Facebook iOS app: the big image display hazy at first, slowly becoming the original image as it loads. Does anyone know how this can be achieved in iOS?
The 'hazy' image you talk about is a 'progressive' jpeg. You can re-format any arbitrary image to a progressive jpeg (on the server side), then use the Image I/O methods to display partial versions. There are a variety of techniques you could use - see this prior post for more pointers.
You can download and display a thumbnail image view first or just display a temporary loading image while you are downloading the big image. Take a look at ASIHTTP for asynchronous image downloading. There are several other frameworks available as well and tons of sample code if you take time to google.

Thumbnail creation improvement in ios

Hi every one Recently I achieved thumbnail image(png) creation from the pdf and you can see the Thumbnail creation from PDF post Now my problem is, It is taking time to create a thumbnail images when compared to download thumbnails from the server through wifi.Is there any better way to create the thumbnails bit faster.
I notice you have the interpolation quality set to high. If you set it to low, it will likely render faster.

Code an Photo.app like

I'm trying to code myself the Apple Photo.app for iOS.
All is good but when I select an album to see all my pictures it's a bit slow to load all my pictures. All my thumbnail are saved in a database. I manage them with Core Data.
So when I select an album I create a specific request and add all my thumbnail in a scrollview. But I have to wait to see all my thumbnail.
In Photos.app when I select an album all pictures are directly loaded.
How has Apple improved that ?
Thanks a lot !
I am assuming that you are using UITableViewCells with 4 images in each, and that you are recycling the cells.
JPEGs take a lot of decompression CPU cycles. There was a specific mention of this at Apple's recent developer conference. Most likely this is what is slowing you down.
Solution: use PNGs and make sure they are absolutely optimized for the size and resolution that is are the minimum requirements for the thumbnail images. Core data should be fast enough to provide smooth scrolling for thousands of thumbnail images.

What is the best practice for letting users take photos and using them also in a table view?

When developing a mobile app, and letting the user take photos (That later will be shown in full size also) but are also viewed in the table views (mid size) and even in the Google maps pin title view, Should I create a thumbnail/s for every image the user take for the smaller ones? or should I just use the regular image?
I am asking because From the tutorials i saw, and as a web developer, all I could figure out is that when using a web service to get groups of small images you usually get the thumbnails first and only when needed get the Full size image.
But this is an embedded (I know it is not embedded, but i don't have a better way to describe this) app, that all the data sits on the device, So there is no upload performance issues, just memory and processor time issues (loading to view the big HD photos that the cameras take today is very heavy I think.
Any way, What is best practice for this?
Thank you,
Erez
It's all about memory usage balanced with performance. If you don't create thumbnails for each photo, there are only so many photo you can hold in memory before you receive memory warnings or have your app terminated by the system (maybe only 6-8 full size UIImages). To avoid that, you might write the photos out to the file system and keep a reference to their location. But then your tableview scrolling will suffer as it attempts to read photos from the file system for display.
So the solution is to create thumbnails for each photo so that you can store a lot of them in memory without any troubles. Your tableview will perform well as the photos are quickly accessible from memory. You'll also want to write the full size photos to the file system (and keep a reference to their location) to avoid having to store them in memory. When it's time to display the full size image, retrieve it from the file system and store it in memory. When it's no longer needed, release it.
I'm assuming that you're in iOS4, and you are saving the photos in the Asset library, there is already a method for you.
http://developer.apple.com/library/ios/#documentation/AssetsLibrary/Reference/ALAsset_Class/Reference/Reference.html
You're looking for the "thumbnail" method.
So, save the large image, and compute the thumbnail when required, I believe, is the way to go.

Resources