Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Color Image::getPixel(unsigned int x, unsigned int y) const{
- if (x > width || y > height) return Color(0, 0, 0);
- return Color(buffer[(y*width + x) * 3], buffer[(y*width + x) * 3 + 1], buffer[(y*width + x) * 3 + 2]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement