我想做一個非常簡單的瓷磚引擎。但是,使用Bitmap.getpixel(x,y)並不總是與顏色正確匹配。這似乎是在0xFFFFFFFF,0xFF000000,0xFF189600和0xFF18FF00,但與0xFF186600有問題。我試圖將其更改爲多種不同的相似顏色,但它似乎仍未正確讀取它。我正在比較一個簡單的switch語句。這裏是我的方法 public void LoadLevel(Canv
問題心不是得到的像素數據我能找到一些來源爲 -(NSArray *)getRGBAtLocationOnImage:(UIImage *)theImage X:(int)x Y:(int)y
{
// First get the image into your data buffer
CGImageRef image = [theImage CGImage];
NS