我已按照说明(仅举几例): How to get pixel data from a UIImage (Cocoa Touch) or CGImage (Core Graphics)? Re: Get pixel data as array from UIImage/CGImage in swift Get pixel data as array from UIImage/CGImage in swift
我的问题是,在某些情况下,当尝试获取100x100 PNG图像的像素值时,像素出错了。例如,通过使用CGContext从同一图像中获取位图来获取这些结果: