So ime during some basic stuff, convert image via convPNG, store it into an appvar, then display it by copying the palate (made of 64 entries), then copying the 80*60 pixel image, scaled up 4 times. In the appvar, the palette is immediately followed by the image.

Original image:

What i see on calc:


Data ime trying to render: http://pastebin.com/avBZ03gF

Code: http://pastebin.com/p8hrtywi

I should note that the image i'me converting has a palette smaller than 64 entries.[/img]
Your HL pointer to the palette is not correct.
It definitely is, i just checked with the latest version of CEmu. (Which works on my PC Razz )
Also becouse i copy 128 bytes of what (should be) palette, and in the appvar the palette is 128, and the actual image is rendered correctly (just with wrong colours), i am certain that HL is correct.
You are using an old version of convpng. That is not the output I get when converting the image.
The version is old, but it has worked flawlessly in the past. BTW these are the outputs given by convPNG:
http://pastebin.com/LkuXziCi
http://pastebin.com/Z2nhx2a2
For consistency i will try the newer version.

Edit: tried latest version, same result, suspecting it's a problem with my code. (Which i pasted here)
Bump:
Somehow, coping the palate to mpLcdPalette+2 instead of mpLcdPalette fixed most of it. However the background became brown somehow:


Edit:
It seems like the ConvPNG puts white as "000h" in the image but the first palette entry isn't white. Thus the colours are incorrect. Does this have something to do with transparency?
  
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

 

Advertisement