getPixel(_:atX:y:)
Returns by indirection the pixel data for the specified location in the bitmap image representation.
Declaration
func getPixel(_ p: UnsafeMutablePointer<Int>, atX x: Int, y: Int)Parameters
- p:
On return, an array of integers containing raw pixel data in the appropriate order according to the object’s bitmap format. Smaller integer samples, such as 4-bit, are returned as an integer. Floating point values are cast to integer values and returned.
- x:
The x-axis coordinate of the pixel.
- y:
The y-axis coordinate of the pixel.
Discussion
The origin is in the top-left corner.