I'm tying to display a picture on the screen. I use the CopySprite routine and SourceCoder. But the colours of the picture are absolutely wrong. It looks like it was inverted, but it isn't. And when I press the menu button, the picture is displayed correctly for a sec:

I know, the calculator has a 16bit display (I guess RGB565) and if convert an image from 24bit, it looses shades, but the colours don't change.

So, what have I done wrong? How can I fix the colours?
You have probably followed one of Simon's guides, which tend to use some of the getkey routines that set the display into 3-bit color mode. Smile Can you please share your code, or at least the relevant main() code?

#include <display.h>
#include <display_syscalls.h>
#include <keyboard.h>
#include <sprite.h>

#include "../img/kocka.h"

int main(void) {
   int key;

   VRAM_CopySprite(kocka_kep, 30, 30, KOCKA_WIDTH, KOCKA_HEIGHT);

   while (1) {
      switch (key) {
   return 0;

kocka.h includes the bitmap.
Oh dear, what a mess. Wink You have indeed been reading Simon's guide, it looks like. Try this instead:

int main(void) {
   int kcol, krow,key;
   CopySprite(kocka_kep, 30, 30, KOCKA_WIDTH, KOCKA_HEIGHT);

   while(1) {

Also, thanks for shrinking your avatar. Smile
Oh, thank you very much. You've saved my life!!!
balping wrote:
Oh, thank you very much. You've saved my life!!!
So that worked for you? Feel free to keep the questions coming. Smile
Relevant documentation on WikiPrizm.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum