Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 01-03-2013, 06:47 PM   #1
koenieee
Enthusiast
koenieee doesn't litterkoenieee doesn't litterkoenieee doesn't litter
 
Posts: 49
Karma: 206
Join Date: Nov 2012
Device: Kobo Glo
Take screenshot from Kobo

Thanks to this link: http://www.cnx-software.com/2010/07/...er-screenshot/
we can make screenshot from our Kobo screen.

* requires telnet

run this command:
Code:
cat /dev/fb0 > screen.raw
get the screen.raw via ftp to you local computer that's running PERL.

Create a new perl script with this contents:

Code:
#!/usr/bin/perl -w

$w = shift || 240;
$h = shift || 320;
$pixels = $w * $h;

open OUT, "|pnmtopng" or die "Can't pipe pnmtopng: $!\n";

printf OUT "P6%d %d\n255\n", $w, $h;

while ((read STDIN, $raw, 2) and $pixels--) {
   $short = unpack('S', $raw);
   print OUT pack("C3",
      ($short & 0xf800) >> 8,
      ($short & 0x7e0) >> 3,
      ($short & 0x1f) << 3);
}

close OUT;
Chmod +x FILE.sh

after that run this:
change the resolution to your Kobo screen (I have a kobo Glo)
Code:
./FILE.SH 1024 758 < screen.raw > screen.png
And there you go, screen.png contains you Kobo Sreenshot.

Last edited by koenieee; 01-04-2013 at 04:37 AM.
koenieee is offline   Reply With Quote
Old 01-04-2013, 11:10 PM   #2
RoninTech
Zealot
RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.RoninTech ought to be getting tired of karma fortunes by now.
 
RoninTech's Avatar
 
Posts: 149
Karma: 1000036
Join Date: Oct 2008
Location: Calgary, Alberta
Device: iPod Touch,iPhone3GS/4, Nook Colour, Kobo Touch, Kobo Glo, Nexus 7
Good one!
__________________
Cheers,
Ronin
RoninTech is offline   Reply With Quote
 
Enthusiast
Old 01-07-2013, 09:22 AM   #3
stewacide
Groupie
stewacide ought to be getting tired of karma fortunes by now.stewacide ought to be getting tired of karma fortunes by now.stewacide ought to be getting tired of karma fortunes by now.stewacide ought to be getting tired of karma fortunes by now.stewacide ought to be getting tired of karma fortunes by now.stewacide ought to be getting tired of karma fortunes by now.stewacide ought to be getting tired of karma fortunes by now.stewacide ought to be getting tired of karma fortunes by now.stewacide ought to be getting tired of karma fortunes by now.stewacide ought to be getting tired of karma fortunes by now.stewacide ought to be getting tired of karma fortunes by now.
 
Posts: 160
Karma: 1051770
Join Date: Jul 2012
Device: Kobo Glo, Kobo Touch
Someone with telnet set up, you could use this technique to determine the Kobo Glo's maximum native image size and forward this information onto the Calibre developers in order to create an optomized Kobo Glo output profile.
stewacide is offline   Reply With Quote
Old 01-16-2013, 04:54 AM   #4
ichrispa
Enthusiast
ichrispa shines like a glazed doughnut.ichrispa shines like a glazed doughnut.ichrispa shines like a glazed doughnut.ichrispa shines like a glazed doughnut.ichrispa shines like a glazed doughnut.ichrispa shines like a glazed doughnut.ichrispa shines like a glazed doughnut.ichrispa shines like a glazed doughnut.ichrispa shines like a glazed doughnut.ichrispa shines like a glazed doughnut.ichrispa shines like a glazed doughnut.
 
Posts: 40
Karma: 8604
Join Date: Dec 2012
Location: Germany
Device: Kobo Touch
I'm triggering the following script via an integrated webserver on the kobo touch... screenshots directly to the desktop ^^

Quote:
#!/mnt/onboard/.local/bin/python

import png
import struct

RAWD = "/mnt/onboard/.local/tmp/screenshot.raw"

# create a raw image
fb = open("/dev/fb0", b"r")
rawf = open(RAWD, b"w")
rawf.write(fb.read(1089536))
rawf.close()

rawf = open(RAWD, b"r")
pngf = open("/mnt/onboard/.local/tmp/screenshot.png", "w")

rawpng_flat = []
rawpng = []
pixel = []

data = rawf.read(2)
print "Screen data aquired"

while data != "":
r5 = (struct.unpack("H", data)[0] >> 11) & 0x1F
g6 = (struct.unpack("H", data)[0] >> 5) & 0x3F
b5 = (struct.unpack("H", data)[0]) & 0x1F
r8 = (r5<<3)+(r5>>2)
g8 = (g6<<2)+(g6>>4)
b8 = (b5<<3)+(b5>>2)

rawpng_flat += [r8%256, g8%256, b8%256]
data = rawf.read(2)

print "Writing Screenshot"
png.Writer(width=800,height=600,bitdepth=8).write_ array(pngf, rawpng_flat)

pngf.close()
rawf.close()
ichrispa is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Taking a screenshot on Kindle 4 Blog Kindle Amazon Kindle 2 10-06-2012 01:44 PM
ssknap (v1) - screenshot as screensaver fbdev Kindle Developer's Corner 6 10-22-2011 09:41 PM
Post a screenshot of your desktop. KryptoNyte Nook Developer's Corner 103 07-09-2011 04:48 PM
DR800 screenshot madusaya iRex 5 04-29-2010 06:31 PM
Screenshot Capability? wallcraft OpenInkpot 4 12-31-2008 01:41 PM


All times are GMT -4. The time now is 08:39 AM.


MobileRead.com is a privately owned, operated and funded community.