View Single Post
Old 04-29-2012, 02:03 AM   #15
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by jmseight View Post
Q1) I understand that I can compile in the Kindle with gcc with Debian and OptWare. Debian is taking up 500MB in my Kindle and I am seriously thinking about deleting. I am sure I don't want to take another 250MB for OptWare. Is there a more resource efficient way.
A1) You can start with a much smaller image and just copy in the files you want to use. You can install optware in the same partition with the debian stuff. I started with 64MB but I kept running out of space and I had to keep extending it until it got to 2GB (max size for FAT fs). You can copy the files you really want to the FAT partition, but you need to replace any symlinks with COPIES of the symlinked files, then you do not need a loop mount. I have a bunch of apps that run fine on my kindle from the debian loop mount that run fine on the FAT drive (not using a loop mount). Not all those programs in the debian or optware partitions need a bunch of libraries, and you can always copy the ones you need.
Quote:
Originally Posted by jmseight View Post
Q2) Would you please explain why you would want to dither 256 colors to 16 colors?
A2) Because the einkfb and mxcfb eink device drivers ignore the bottom 4-bits and only display 16 colors (see my paldemo program for a photo from my kindle screen compared to a copy of the framebuffer). As it turns out, when you copy ANY 256-color images from a framebuffer, the contents have also been dithered just like my code does. You can load a raw framebuffer image into a program like IrfanView and do histogram analysis on it, and you will see that only 16 evenly-spaced colors are used in the 256-color palette (a sure sign of dithering). So the kindle programs that display images dither 256 color images into 16 colors, and any 256-color output I want to display correctly after truncating to the 16 hardware colors must also be dithered to those 16 colors. Because wb0 is not dithered, you can copy it to fb0 and do eips '' to see how it looks with the bottom 4-bits truncated, which can be fixed with dithering like I do in newtrix when the "gs=1" flag is set.
Quote:
Originally Posted by jmseight View Post
Q3) Since most non-e-book programs are written with 24-bit colors, I have been converting 24-bit color to 8-bit color, then from 8-bit to 2-bit by dithering. Maybe there is a quick way to combine the dithering with grayscaling in one operation...
A3) There is. In fact, I have some unfinished code that does this for color BMP files (easy to parse image format). Many modern file formats require linking your code to a compression library, and library calls can result in library version dependencies so you need to link different versions of your program for different library versions (not fun). I added BMP input to my "gmlib" functions to avoid such external library dependencies.
Quote:
Originally Posted by jmseight View Post
Q4) Motion streogram will be an excellent demo on the Kindle. My classmate made a 3D rotating cube and hypercube on the computer display, and it made quite a impression.
A4) I have always been fond of 3D. When I was 13 years old, I made my own anaglyph 3D glasses from index cards, cellophane tape, and red and blue colored cellophane salvaged from discarded "Easter basket" wrappers. Then I spent much of that "summer vacation" drawing many 3D images using red and blue colored pencils. I still have them, but the paper has become yellow (and brown around the edges where more air exposure) and brittle with age. When stereograms were new, I bought all the books, then framed posters (I have many) of random dot stereograms. In fact, a frame HELPS to view them -- just look at your reflection in the glass and move away from it until your reflection is at the same distance as the objects in the stereogram. Back in the day, I wrote animated stereogram programs for old DOS computers back when DOS was king... I still love 3D (we bought an LG 55lw5600 for christmas). It would be very easy to do random-dot stereogram animation in the kindle -- try it. My functions are not that difficult to use. I plan to finish my kindlebrot program, then my z-buffer 3d program, then I want to add eink support to a linux kernel bootable from MfgTool (for kindle recovery with GUI). ... But my JOB keeps intruding.


Last edited by geekmaster; 04-30-2012 at 12:33 PM.
geekmaster is offline   Reply With Quote