Jump to content



Photo
- - - - -

Casio Prizm Png Viewer


  • Please log in to reply
5 replies to this topic

#1 ProgrammerNerd

ProgrammerNerd

    Newbie

  • Members
  • Pip
  • 12 posts

  • Calculators:
    Casio Prizm

Posted 12 September 2014 - 12:38 AM

Download here http://www.cemetech....de=file&id=1095
Edit sorry to release a new version so soon but I just noticed that in certain instances libpng would output a harmless warning however this is annoying as it overlaps the image so I fixed the cause of the warning.
The source code can be found here https://github.com/C...Casio-ImageView
===========================================
Casio prizm PNG viewer
===========================================
This is a png viewer for the casio prizm.
It uses libpng (which is paired with zlib) to decompress a PNG file.
When you load a png file it is resampled to fill the screen but aspect ratio is preserved.
As of now a simple bilinear filtering is used
but if there is intrest I may replace it with something better.

The version you downloaded is version 1.0
It is likely that there will be versions
so if you notice that I post in the thread
see what I put it may be an update.

============================================
Controls
============================================
You will see a file browser on startup use the arrow pad to select a file.
Then press either F1 or EXE to select the PNG file.
Press any key except menu (which actully takes you to the menu)
to go back to the file browser.

===========================================
Notes and tips
===========================================
Since the casio prizm does not have lots of memory run pngout
on the images before putting them on your calculator.
I have included instructions on how to compile libpng and zlib here:
https://github.com/C.../Compile Libpng
Following these instructions gets you a libraries (libpng and zlib)
that you could link against your add-in.
If you want to use a png in an add-in a good option would be to make a 16bit 1 channel image containg rgb565 data.
I however would not use png instead I would just use zlib directly with a simpler image format.
For example uint32_t width,uint32_t height, deflate compressed sequential rgb565 data created by zlib's deflate(2) function.
But if you feel comfortable with png that is an option.
Also you can store the pngs as a const array it does not need to be a file. I just used files because this is an image viewer.
The purpse of this program is simply to show off how capable the casio prizm is.
The PNG image format is well know and I think some people wrongly precive it as a very ram intensive thing to decode.
Libpng can output a row at a time or N amount of rows. When width!=384 or if height>=216 then the image is scaled
Ony enough ram to hold 2 rows is needed which is 6*width bytes of ram. I use bilinear scaling that is why two rows are needed to be read.
After the code interoplates the pixels the resulting pixel is converted to rgb565 and sent to VRAM.
When the width==384 and height<=216 a buffer is created and the image is read all at once
then simply converted to rgb565 and send to VRAM


Edited by ProgrammerNerd, 12 September 2014 - 12:53 AM.


#2 flyingfisch

flyingfisch

    Casio Maniac

  • Deputy
  • PipPipPipPipPipPipPipPip
  • 1891 posts
  • Gender:Male
  • Location:OH,USA
  • Interests:Aviation, Skiing, Programming, Mountain Biking.

  • Calculators:
    fx-9860GII
    fx-CG10 PRIZM

Posted 12 September 2014 - 12:47 AM

Maybe you could format that post a little? Kinda hard to read ;)



#3 ProgrammerNerd

ProgrammerNerd

    Newbie

  • Members
  • Pip
  • 12 posts

  • Calculators:
    Casio Prizm

Posted 12 September 2014 - 12:49 AM

Sorry for some reason when I press edit on this page I am taken to the plain text editor instead of the rich text editor.

So with that said when I paste my post the newlines are not converted to </ br>



#4 flyingfisch

flyingfisch

    Casio Maniac

  • Deputy
  • PipPipPipPipPipPipPipPip
  • 1891 posts
  • Gender:Male
  • Location:OH,USA
  • Interests:Aviation, Skiing, Programming, Mountain Biking.

  • Calculators:
    fx-9860GII
    fx-CG10 PRIZM

Posted 12 September 2014 - 12:51 AM

Happens to me sometimes too, try reloading the page, that usually fixes it ;)



#5 ProgrammerNerd

ProgrammerNerd

    Newbie

  • Members
  • Pip
  • 12 posts

  • Calculators:
    Casio Prizm

Posted 12 September 2014 - 12:55 AM

Thank you that did fix the issue.

#6 flyingfisch

flyingfisch

    Casio Maniac

  • Deputy
  • PipPipPipPipPipPipPipPip
  • 1891 posts
  • Gender:Male
  • Location:OH,USA
  • Interests:Aviation, Skiing, Programming, Mountain Biking.

  • Calculators:
    fx-9860GII
    fx-CG10 PRIZM

Posted 12 September 2014 - 12:57 AM

No problem :)






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users