converting the thumbnile image into original size - iphone

i am converting the image into thumbnail format and sending it to server and i want to convert it back to original size while receiving can any one please tell me how to resize the image to original without loosing quality.....
i tried directly to displaying the image in image view but the quality of the image is missing ...
can any one please help me how to maintain the quality of the image .......

Downscaling is irreversible, some information lost forever.

What you're asking isn't possible. You can't enlarge an image while maintaining the same quality. If you think about an image as a mapped array of pixels (literally, a "bit-map"), this makes sense. The image is saved with a fixed amount of data, and that's all you have to work with when you resize it. Any examples to the contrary (like TV shows) are purely fictional.
Investigate using vector graphics instead, which can be resized at will without a loss of quality.

you simply can not convert an image from thumbnail to original size and retain the quality it had in its original size.
if you want to display the image full-size, you have to send the full-size image.

You could think about using a Vector image? They do not lose quality when resized. But I have no clue whether you can use them for thumbnails in iOS.
See this wiki page for more info about Vector graphics.

Related

Agora Video Resolution In Unity

I'm working on an app that uses agora sdk for unity. I'm rendering video on UI Raw Images and using a video resolution of 480x480. The thing is that the video in those images looked a bit stretched and to handle that I set the orientation to fixed portrait and it looks better but not perfect. So I want to ask, do I need to resize the images according to video resolution i.e. if video resolution is of 480x480 then the raw image size should be 480x480 in width and height as well? I also need to present a user's video in a much larger image so what video resolution should I choose given the size of raw image 980(w) x 1600(h). I just need the videos to best fit the images so it looks good. Any help would be much appreciated.
Yes, you should resize the image according the resolution in general. There is a callback method that tells what the video resolution size is. You may find that information in VideoSurface's code where reference to UpdateVideoRawData() is. The actual Raw Image itself doesn't have to match the size and the data will fill in within boundary. You should maintain a width/height ratio. Or if you want to crop the image, you may need to apply some masking technique. Crop the video data itself maybe another approach but that will add CPU overhead for you.

Compress Image in Swift without losing background transparency

i am looking for a way to compress images with background transparency. I already know about UIImageJPEGRepresentation(FILE, CompressionLevel). With this snippet I reach my wished compressed file size (<100Kb (image quality is not that important)) but I lose my background transparency.
Does anyone of you guys know how to compress an image without losing its transparency?
if this helps in any way: I need to convert the image to data format anyways for certain actions and calculation.

upload and preview as repeated background image

I am searching for a tool on web but didnt got any success their at all. I want to have something like upload and preview the image as background as repeated one or any other alternative...
I have this sample:
How can I preview and cut the image as a perfect background image as repeated one. Is it possible in Photoshop or in some similiar products?
The trick i have recovered is crop a part of the image in a big canvas of Photoshop and then making the deuplicate copies of the layers...
If the image seems like irregular it means the cropped image is wrong so you have to change with a other or larger part of the image...
If it is regular and doesn't cut at the side onto the edge, it means image is perfect making background repeated...
Thanks...

iphone reduce large image loading time

Anybody know how to load the large image to become a blur image first and then only slowly load the full size of image. This will at least let the user to preview the image first other than waiting for a few second to load the full size image.
Thanks
You have to prepare two images, one is for blur image, and one is for the full size of image. As for the JPEG image with EXIF, it contains a thumbnail image inside. So the digital camera will show the thumbnail images when browsing.
Somehow I remember in Image processing class, professor told us that when browsing the web, the server would send your browser a blur image A, and another image B, after you getting both, your computer will be doing image computation on A&B to produce an intermediate image C and do computation on A&C produce another image...this procedure goes on for a couple times to get the original image. That's why you are seeing blurred image at the first place. This procedure theoretically reduce image size linearly.

How to show a big image on the iPhone (without overflowing the memory)?

I have an application that let's users view images. The user decides what images to use, so the size can range from 10x10 to 10000000x10000000 (I am exeggerating). All is well up to a certain size, when the image is bigger than the iPhone's memory. Quite understandably.
But how do I fix it? Is there a way to load only a portion of the image (I'm using an CATiledLayer, so I could load/release tile by tile).
Thanks in advance!
Unless you have an uncompressed image format it would be very hard to load the image in patches, you will have to provide the patches that the user would load, determine what portion of the image to show, and load the correct patches. There is an example for this "ScrollViewSuite" that demonstrate that technique. But this technique does require a preprocessing step.