Review: Core Image for Swift: Advanced Image Processing for iOS by Simon J Gladman


Who is the book for?

Core Image for Swift: Advanced Image Processing for iOS is for those iOS and OS X programmers who have only really used Core Image out of necessity for when UIImage was not capable of providing a solution and now wish to go further. It is also for those who are already acquainted with Core Image and wish to delve deep into the frameworks of Core Image and Metal.

At every stage and level of complexity the author, Simon Gladman, is there to guide us and never do we feel alone or set adrift in this book.

First impressions

The first thing I noticed about this book was its use of the Apple textbook format. This gives it a clear and concise feel. It is extremely visual, providing examples of the Core Image filters under discussion (in static and animated form) and also clear code examples that are short and readable.

This sense of clarity is carried through to the text itself. There are recommendations throughout on how to optimize the performance, and it is often the little things that make the difference. These things give the book the sense of being both accessible and of providing a source of reference for many years to come.

Accompanying repositories

You will see from Simon's biog the many years that he has spent working with graphics and image technology, and those working in Swift will likely be aware of the work he has done with image filters, including the Nodality app, and particle generation using Metal on iOS. The majority of the work he explores in this book and in his blog exists on GitHub, and the repository written to accompany Core Image for Swift is there too under the name Filterpedia. Throughout the work there are signposts to these repositories.

The repositories provide fully working examples and Filterpedia gives an immediate sense of the scope and flexibility of Core Image.

Areas of interest 

There are plenty of areas of interest in this book. To give one example, I learnt that it is possible to create barcodes with the Core Image technology, something that had never caught my eye in the Apple docs even though it interests me greatly.

In addition to revealing the sheer scope of possibilities, the book also holds the reader's interest through what is almost a history of photographic styles and technical restrictions. The reference points of the Apple II and Commodore 64 are great fun along with the simulation of watching a Cathode Ray Tube. We also learn the origins and name of the Kuwahara filter. Simon's enthusiasm for experimentation shines through at every point.

Fine detail 

There are many points of fine technical detail. For example, the explanation of how filters can be chained together and provide a combined calculation for their output rather than processing the image time and again.

There are also practical points of implementation: at one point it is explained that when using an image picker and converting the UIImage from the photo library to a CIImage the orientation will change. (At this point the author provides a most welcome drop-in solution for the issue!)

Conclusion 

It is clear that this book has been written with great care and with affection for the subject. Not only does it save us many hours of translation from Objective-C into Swift but it also takes the often difficult to read Apple docs and transforms them into something that we can all understand with clarity.

I've no doubt that as a reference resource as well as a straight-through read this book will save many programmers not only hours but also weeks and months of their time. Helping optimization and preventing bugs from arising.

Note: I will shortly be submitting this review to be my first post written natively in Apple News Format. I'll add a link once it is available.


Comments