I am trying to scale rectangle photo or icon. I am creating svg-png-icon type photo but i couldn't scale for only middle of the photo. For example;
When i will change the x variable (width of middle) only middle will change. Its such as linear animation.
Please check images.
enter image description here
enter image description here
Related
i have a small story editor where a user can pick a gif and overlay on the image. I save the position, rotation, width and height of the gif and need to overlay it on the image and export it all as a gif.
How do i correctly keep the main image background size and overlay each gif with the custom size, rotation and position and export it?
I am trying to making a sniper zoom using unity. When user zooms i want to show
Sniper Scope image.
I simple place the image in Unity Image Component.
Here is the image example
The image stretches like this.
How can i maintain the aspect ratio. There is once option for saving the aspect ratio but then it removes background from top and bottom
When i want change my profile photo in Skype i have a screen
When i click Take Photo my next screen is
and i can scale this pic to make them bigger
after i tap Use Photo my pic is cut and i see in the circle
I know how to take photo and paste in my ImageView but how they create this template area which will be cut the picture and how cut it ? Any hint please
In image app i have to blur the selected areas of image. Something like create mosaic at selected area of image. i have to get each pixel color of selected area and then increase the size of each pixel. here is the reference link that i am using http://soulwithmobiletechnology.blogspot.in/2011/05/create-mosaic-with-your-image-part-1.html . But not able to implement this practically for selected area. Can any one have some sample for the same.
There are two solutions for this
1. Get the screen shot of the area where you want the mosaic effect and apply effect to the same portion. Then add the image(with mosaic effect) to the original image.
2.Get the pixel of the area you want to be effected and then gave effect to those pixels.*
When we take a photo on an iphone , the image is shown in fullscreen without any "grey bar" at the top i.e. the image is shown in the frame 320*500 size . I want to display that image in my app , but the app has a maximum frame of size 320*480 . Hence when I try to show the image in my app as fullscreen , it is shown as a stretched image . I tried all contentMode options but it didn't work .
So , how to scale an image or how to fix a size of frame so that the image is shown as it is but in a smaller frame without any distortions or something like in "Photos" app of iphone?
When you take a picture, you actually don't see the full-sized photo, you see only the part which fits your display instead (the photo's resolution is bigger than the iPhone's display resolution). So if you want to take a resulting image and show it fullscreen, then you need to do some simple calculations in order to scale image, leaving its proportions correct:
// We know the desired resolution. It's full screen (320, 480) or (640, 960).
// Now we want to determine the destination imageView frame with maximum dimensions
// for it to fit the screen AND leave the image's proportions
float minScale = MIN(screenResolution.width/actualImgWidth, screenResolution.height/actualImgHeight);
// With minScale one side will fit full screen, and the other will occupy a bit smaller space than the screen allows
destImgView.bounds = CGRectMake(0, 0, minScale*actualImgWidth, minScale*actualImgHeight);
destImgView.image = actualImg;