Converting images into Swift code
In order to create the three outlines that we need, we first have to convert images into vectors and then convert those vectors into Swift code. Why do we have to convert an image into Swift code?
Well, in order to place an animating stroke around an image, we need a path for the animation to follow. When the image has been translated into code, it will then be easy to use Swift to follow the image outline.
However, there’s a problem: bitmaps. A bitmap, also called a raster image, is a graphic that is created from different colored pixels, which together form an image. Bitmaps can be very simple, just made up of two colors (those would be black and white), or they can have many thousands or millions of colors that produce photograph-quality images. Some examples of bitmap formats that you will see use the file extensions PNG, JPEG, and TIFF. With a bitmap image, there is no defined outline for any code to follow, and thus it cannot have...