07-27-2012, 03:49 PM | #31 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
The 8-bit framebuffer images can be read directly by some paint programs if you tell it the width and height. On a K4, or a K5 booted from diags, it is 8-bit grayscale 600x800. On a K5 booted from main it is 608x800. It would be possible to create a simple text-only PGM header for each format, and append the framebuffer copy to that so paint programs do not need to be told the image resolution.
The K3 is a little more complex because it has 2 pixels per byte. You can get a general idea of what the image looks like by loading it into a paint program as a RAW 300x800 image. But better, dpavlin has a convertor to that reads framebuffer images and writes a standard image format. You can find it in the tools index or K3 index I think... You can do all of these things from a script that can be installed in the GUI launcher menu, or from launchpad, or from the kite launcher. |
07-27-2012, 04:12 PM | #32 |
Connoisseur
Posts: 58
Karma: 31942
Join Date: Feb 2012
Device: Kindle 3, Tolino Shine, Kobo Glo
|
I've also recently written and tiny-c-compiled several small utilities to convert framebuffer to conventional graphic formats - bmp, pgm, tiff and png (based on the LodePNG version 20120623 by Lode Vandevenne). These were succesfully tested on my K3 (4bpp), but unfortunately, I have no 8bpp raw images to play with... If someone could provide raw-8bpp-files made on K4 & K5, I would be very appreciated.
Just for testing purposes - screen2png, that contains [i] c-code & compiled binary to make png-shots and store them in the /mnt/us/pictures/screenshots/ (so that Alt-Z allows you to see the made screenshots via the built-in picture viewer) and [ii] scripts to launch it from launchpad (Shift-Q-Q = instant shot, Shift-Q-W = shot after 10 seconds) & kite. [UPD] Here is the c-sources and compiled binaries to convert the framebuffer content to uncompressed bmp, pgm & tiff and, then, to compress them with the system call of bzip2. I expect that screen2pgm should properly work on 8bpp-devices. Last edited by NuPogodi; 07-27-2012 at 05:22 PM. |
07-27-2012, 04:29 PM | #33 | |
Connoisseur
Posts: 61
Karma: 2667
Join Date: Mar 2012
Device: kindle touch
|
Quote:
If someone can write these instructions as a .sh i would test in my k5 and post the output or feedback if it worked or how... thanks in advance! |
|
07-28-2012, 04:09 PM | #34 | |
Connoisseur
Posts: 61
Karma: 2667
Join Date: Mar 2012
Device: kindle touch
|
Quote:
I have managed to get this to work here , but all i get from screen2tiff , screen2pgm and screen2bmp are *.bz2 , end in every 3 , after extracted and converted , i just have buggy images. yes, when the commands are called they tend to work , and also write on /mnt/us/ the files , the only problem seems to be that the image get corrupted somehow... I´m on kindle touch. maybe this should work for nontouch only ? geekmaster; maybe this problem comes from the tiny diferences on 600x800 and 608x800 ? if its that , could you fix this up maybe ? thanks ! Last edited by TulseLuper; 07-28-2012 at 04:12 PM. |
|
07-28-2012, 04:46 PM | #35 | |
Connoisseur
Posts: 58
Karma: 31942
Join Date: Feb 2012
Device: Kindle 3, Tolino Shine, Kobo Glo
|
Quote:
Alternatively, you (or anyone else) may do it by yourself, since the sources are included. |
|
07-28-2012, 04:52 PM | #36 |
Connoisseur
Posts: 61
Karma: 2667
Join Date: Mar 2012
Device: kindle touch
|
hi nupogodi ,
I didn´t got this from the statement at first , sorry... but Unfortunatelly i don´t have here neither the tool nor the known to correct and compile that, i´d be glad altough to test any changes that you or anyone else get to make and post up some results for the community. really thanks |
07-28-2012, 04:58 PM | #37 | |
Definitely not King Kong
Posts: 126
Karma: 59238
Join Date: Jul 2012
Location: United States
Device: Kindle Touch
|
Quote:
P.S. - I compressed it so I could upload it. |
|
07-28-2012, 05:00 PM | #38 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
A good place to start is by looking at my scripts (and others based on them) in the "eink algorithmic art scripts" thread that adapt to the screen resolution. They use a variable referred to as "stride" for distance in bytes between adjacent vertical pixels. See how they do it. Those scripts work on DX/DXG/K3/K4main/K4diags/K5main/K5diags. The main and diags boot modes actually use the framebuffer differently, so I had to compensate for that. And DX/DXG/K3 use two pixels per byte. EDIT: A good way to start learning how to write scripts is to take a working script that interests you (such as the algorithmic art scripts that draw to the framebuffer) and make little changes to them and debug your changes, then make progressively bigger changes. Be sure to publish (back to the art scripts thread, or wherever most appropriate) anything interesting that you create. It is not necessary to create a bunch of new threads when appropriate existing threads can be added to with relevant new stuff. Last edited by geekmaster; 07-28-2012 at 05:16 PM. |
|
07-28-2012, 06:16 PM | #39 |
Connoisseur
Posts: 58
Karma: 31942
Join Date: Feb 2012
Device: Kindle 3, Tolino Shine, Kobo Glo
|
Thanks, despite it seems a bit strange... I was pretty sure that the framebuffer in KT has to be 608*800 ~ 480KB when yours file is much larger (2MB, after unzipping). I've nevertheless modified the source code for the simplest format - portable graymap. Although I still have some doubts whether it works properly (especially for both screen orientations), You may try it and report the results.
PS. If the attached binary fails to make proper shot, could you please run "eips -i > /mnt/us/eips.txt" (for both orientations) and copy-paste the content of eips.txt? (UPDATE) It seems that 8bpp-improvement is some kind of marketing mythos. Hex-codes in the attached raw file are always with the same high and low 4bit-nibbles, like 0x00, 0x11, ... 0xEE, 0xFF. It means that there are actually 16 colors. It might be a bit improved by dithering, but nevertheless... only 16 grades of gray, like in old-fashioned models (k2, k3 & kdx), just a bit remapped to increase the buffersize Last edited by NuPogodi; 07-28-2012 at 07:09 PM. |
07-28-2012, 07:07 PM | #40 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
I normally cut the framebuffer at 800 lines. It actually has more than twice that, and you can scroll the top of screen to any of those pixel lines (by poking the line number into a proc file buried deep inside /sys). The framework ignores that value though. When you dd the framebuffer without specifying the count, you get the entire thing, including the parts that the framework does not use.
|
07-28-2012, 07:19 PM | #41 | ||
Connoisseur
Posts: 61
Karma: 2667
Join Date: Mar 2012
Device: kindle touch
|
Quote:
and about the eips.txt ; Quote:
PS- also , it´s good to say that i´m running these insede xterm because i could´t get usbnetwork here yet - sic. |
||
07-28-2012, 07:39 PM | #42 |
Connoisseur
Posts: 58
Karma: 31942
Join Date: Feb 2012
Device: Kindle 3, Tolino Shine, Kobo Glo
|
Thanks for report. Now it is more clear. It looks that i have used info.xres_virtual instead of info.xres. Fixed... now it might work.
|
07-28-2012, 10:19 PM | #43 |
Definitely not King Kong
Posts: 126
Karma: 59238
Join Date: Jul 2012
Location: United States
Device: Kindle Touch
|
Update: Now part of Gui Launcher Collection with multiple time options and converts it to png not jpg.
EDIT: Oh god... My Shame..... I could have just wrote a script like this. Then we could have saved SOO..... Much time. (Unless I missed something...) Code:
sleep 30 && screenshot Works great! Great Job NuPogodi. I'm uploading an extension which uses your program to take a screenshot, converts it to jpg, moves it to /mnt/us/Images/Screenshots, and finally opens the image viewer so you can look at your new image. It should work in allowing people to draw something, launch your app, go back to draw tool, and then have a screenshot. I'm still looking into making the button work but I suck a JavaScript (and everything else)... I suppose eventually we will figure it out. Just a quick to every who helped make this work. Last edited by Titano; 08-02-2012 at 09:13 PM. |
07-28-2012, 10:41 PM | #44 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
|
|
07-28-2012, 11:30 PM | #45 | |
Definitely not King Kong
Posts: 126
Karma: 59238
Join Date: Jul 2012
Location: United States
Device: Kindle Touch
|
Quote:
|
|
Tags |
launcher add-ons |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Draw Something on PE but Marmelade Error?? | jdm001 | enTourage eDGe | 4 | 03-27-2012 11:10 AM |
draw on netbook? | Stryder | enTourage Archive | 5 | 05-24-2010 04:34 PM |
Anyone Else Draw on Their Cover? | Drezin | Sony Reader | 25 | 03-04-2009 02:22 PM |