NSBlog
"A failure in the hot air department"
Showing entries tagged "image". Full blog index.
Friday Q&A 2012-09-28: Optimizing Flood Fill
at 2012-09-28 13:17
Last time, I presented the implementation of a basic flood fill. That implementation works fine, but is not terribly fast. Today, I'm going to walk through various optimizations that can be done to make it faster, using techniques which I hope will be useful in many different situations. Ultimately, starting from the original code, I was able to achieve over an order of magnitude speedup while still keeping the code relatively straightforward and clear.
Friday Q&A 2012-09-14: Implementing a Flood Fill
at 2012-09-14 14:16
Following up from the previous article about manipulating image data, Marc Palluat de Besset suggested a followup discussing the implementation of a flood fill. Today, I'm going to walk through the theory and practice of implementing flood fill on an
NSBitmapImageRep
.Friday Q&A 2012-08-31: Obtaining and Interpreting Image Data
at 2012-08-31 14:52
Cocoa provides some great abstractions for working with images.
NSImage
lets you treat an image as an opaque blob that you can just draw where you want it. Core Image wraps a lot of image processing in an easy-to-use API that frees you from worrying about how individual pixels are represented. However, sometimes you really just want to get at the raw pixel data in code. Scott Luther suggested today's topic: fetching and manipulating that raw pixel data.