Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [BUG] Print Image Colors

Author
Message
Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 8th Aug 2017 20:30 Edited at: 8th Aug 2017 21:51
When I print an image that I just grabbed from the screen, the colors are inverted. It's kind of hard to explain since I can't show the printout here, but the red becomes blue, and the blue becomes red.

I also save the image, and the saved version has the right colors.

So, I put a red sprite (a box shape of 255,0,0,255 color), a green sprite, and a blue sprite box on the screen, left to right in that order.

I render, then get the image.

I print the image and I see a blue box, a green box, and a red box, in that order. The colors seems a little dark, red and blue are inverted though.
I have some red text on the screen and it also comes out blue.

I save the image and the colors all match the screen, so I'm guessing it's something in the PrintImage() command.

EDIT: This happens with images that I load and print, so it's not the getimage, it's the PrintImage(). Maybe some kind of little-endian vs bigendian problem?
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 10th Aug 2017 16:00
Thanks, fixed for the next version

Login to post a reply

Server time is: 2024-09-30 07:16:57
Your offset time is: 2024-09-30 07:16:57