I am working on a photo editing application where I need to squeeze/squash car images to create cute caricatures just like the image attached. This is my very first photo editing application so I don't exactly know what term to put on Google search and even how I can achieve this thing. Any help, guidance, or direction would be a great favor.
Please note this is not related to image resizing.
Following are two more examples.




There are a couple ways to do this...
If we use this as the original image:
it has a transparent bounding box... so it looks like this in an image editing program:
If you are only dealing with how it looks at run-time, you can use a
UIImageViewwithContent Mode: Scale to Filland then adjust the width of the image view.If you want to actually scale the
UIImage, this simple extension will do the job:(the image views have a green border, so we can see the frames).
Here is some example code you can play with:
When running, it looks like this - dragging the slider sets the Widths to a percentage of the original: