How do I load and edit a bitmap file at the pixel level in Swift for iOS?
This is how I am getting a color from an image at a touch location. I translated this answer: https://stackoverflow.com/a/12579413/359578 (This sample does no error checking for nil) func createARGBBitmapContext(inImage: CGImage) -> CGContext { var bitmapByteCount = 0 var bitmapBytesPerRow = 0 //Get image width, height let pixelsWide = CGImageGetWidth(inImage) let pixelsHigh = CGImageGetHeight(inImage) // … Read more