| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
unsigned char* pixels = [aBitmapImageRep bitmapData];
int alpha;
// i'm trying to get to the pixel specified by aPoint. I'm sure i should be able to index
// into this with an array somehow "pixels[aPoint.x][aPoint.y]" but can't figure out how
// to do that. In any case I'm pretty sure this loop is where i'm doing things wrong, the pick
// works correctly sometimes, but other returns the wrong answer.
for(i= 0; i <= aPoint.x; i++) {
for (j = 0; j <= aPoint.y; j++) {
pixels++; // red
pixels++; // blue
pixels++; // green
alpha = *pixels++;
}
}
| References: | |
| >How to determine a single pixels alpha? (From: Jesse Grosjean <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.