             return nil
         }
         
+        width = Int(image.size.width)
+        height = Int(image.size.height)
+        
         let bytesPerRow = width * 4
-        let imageData = UnsafeMutableBufferPointer<Pixel>.allocate(capacity: width * height)
+        let imageData = UnsafeMutablePointer<Pixel>.allocate(capacity: width * height)
         let colorSpace = CGColorSpaceCreateDeviceRGB()
         
         var bitmapInfo: UInt32 = CGBitmapInfo.byteOrder32Big.rawValue

        }
        
        let address = y * width + x
        return pixels?[address]
    }
}


            return nil
        }
        
        imageContext.draw(cgImage, in: CGRect(origin: .zero, size: image.size))
        
        pixels = UnsafeMutableBufferPointer<Pixel>(start: imageData, count: width * height)
    }
