When i use uiscrollview for zoom image it's blur.! - xcode

uiimageview -> uiscrollview -> uiview
it's work find for zoom image with gesture method.
but after zoom in imaged. it's image bad quality.
How to reset best image quality depending on zoom in/out scale.

The image quality is going to depend on the original pixel dimensions of the image. If you scale over 100%, you're going to notice a blurring of detail.

Related

NSImageView - scaling image down loses sharpness

I am trying to render a few images in NSImageView's. These images are much larger than the size of the NSImageView (which I have set to scale proportionally up or down). But, the rendered image don't look very good. For example, in this sample image, the white border seems to have jagged edges at the 12,3,6 and 9 o'clock positions. The source image seems to be fine, even when I zoom out all the way in Preview.app.
I have tried scaling the image myself (using MGCropExtensions - which sets the interpolation quality to High), but, it doesn't seem to help. I would imagine NSImageView would internally draw on device boundary automatically, so that shouldn't be an issue?
Any ideas on how to get the image rendered crisply in the NSImageView? Thanks
Source Image - It has a white border which doesn't show here (against the white background)
Rendered NSImageView screenshot

How to keep sprite border the same size when scaling sprite in Unity?

I've created an image in Photoshop to be used as a sprite in Unity and everything works fine while the sprite is scaled at X: 1; Y: 1.
The problem starts when I scale the image up as the border of the image stretches out with the rest of the image. Is there any way to scale an image from its centre or to ignore the image's border when it's scaled?
Here's the example now that I am able to show it:
The rectangle on top is the original image without being scaled up or down and the rectangle on the bottom is scaled at X:5, Y:0.5 but the borders are stretched.
I think that the borders are stretched because it's part of the image and when it's being scaled, the image (including the borders) is just being stretched.
Is there any way to stretch the sprite image but by ignoring the borders?
Are you trying to scale the image and keep the original ratio?
If so, here are the steps:
Hope this helps. Please let me know if you were trying to do something else.
You can use a sliced sprite. The center of the image is scaled to fit the control rectangle but the borders maintain their sizes regardless of the scaling. Check out the Unity doc here: Unity - Manual: Image

UIImagePickerController - Aligning an Image Guide to a Crop Area

I'm using a UIImagePickerController with an overlay of a transparent white rimmed rectangle as a guide for capturing a small section of the view that the user would be interested in, centered in screen coordinates (320 x 480, portrait).
The problem is, I'm not entirely sure which bits of camera's view (actual photo) the viewfinder is showing, it can't be showing all of it because the image resolution is 3264 x 2448, which is a different width-length ratio to the screen space available, and it's showing fullscreen.
I need to be able to crop the exact image area that is "under" the overlay on the UIImagePickerController view from the actual produced image.
I've tried taking a ratio of the width of the sample divided by the width of the portrait camera view, and then multiplying the width of the image by that and scaling the y-coordinates from that, but the results are incorrect.
How could I try to solve this?

Zoom a large image in IKImageView

I have an IKImageView in NSScrollView.
Now, I have two problems:
When I show a large image and zoom it, the animation loos very crappy. Is there a way to get it to switch images more smoothly?
When the image is zoomed bigger then the IKImageView, zoom - centerPoint lock on left - bottom of IKImageView. How can I set the zoom - centerPoint?
Thanks
f91kdash

CGImage gets stretched in CALayer

I have an NSMutableArray of CGImage objects. All the images have different dimensions ( 80x20 px, 200x200 px, 10x10 px, etc...)
I'm trying to animate these in CALayer which has 256x256 pixels size. The animation works, but my CGImages get stretched to the dimensions of the CALayer. How could I prevent my CGImages from getting scaled?
thank you.
To answer my own question. I had to set my layer's contentsGravity property to kCAGravityCenter and that did the trick. The default value of contentsGravity is kCAGravityResize which makes things stretched to fill in layer's bounds.

Resources