I have a series of images that are centered on top of a transparent background. I would like to add a white border to all of them and I could draw it if I had the path of the border of the opaque part of the image. Is it possible to extract this?
Asked
Active
Viewed 1,936 times
8
-
You can accomplish the same thing by adding a shadow to the layer. [Try this](http://stackoverflow.com/a/5428108/2487322) – Idles Jun 19 '13 at 23:18
-
Are the images in `UIImageView`s? If so, a much easier way to add borders is to use layers. E.g., `myImageView.layer.borderColor = [UIColor whiteColor].CGColor` and `myImageView.layer.borderWidth = 2.f` You will need to add the QuartzCore framework to your target, and `#import
` in the .m files using the layers. – bobnoble Jun 19 '13 at 23:20 -
2I don't want a square shadow or border, I want it to be the same shape of the image it contains. – lavoy Jun 20 '13 at 01:50