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: 208
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
Groupie
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: 152
Karma: 1000036
Join Date: Oct 2008
Location: Calgary, Alberta
Device: iPod Touch, Nook Colour, Kobo Touch, Kobo Glo, Nexus 7, Nexus 5
Good one!
RoninTech is offline   Reply With Quote
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: 161
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
Old 09-13-2013, 06:09 AM   #5
ibu
Addict
ibu can illuminate an eclipseibu can illuminate an eclipseibu can illuminate an eclipseibu can illuminate an eclipseibu can illuminate an eclipseibu can illuminate an eclipseibu can illuminate an eclipseibu can illuminate an eclipseibu can illuminate an eclipseibu can illuminate an eclipseibu can illuminate an eclipse
 
Posts: 201
Karma: 8170
Join Date: Feb 2010
Location: Berlin, Germany
Device: iPhone 4S, Kobo Glo
Is there any easy-to-use-script for the Kobo Glo to get a screenshot directly to the desktop or a configurable folder on a pc?
I have no experience with the console at all.

Or is there a calibre plugin which "pulls" a screenshot?
Thanks.
ibu is offline   Reply With Quote
Old 09-13-2013, 07:31 AM   #6
davidfor
Wizard
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 4,233
Karma: 3677668
Join Date: Jul 2011
Location: Australia
Device: Kobo Touch, Kobo Glo
If you look at http://www.mobileread.com/forums/sho...d.php?t=218376, one of the options is a screenshot. When you add:

Code:
[FeatureSettings]
Screenshots=true
Pressing the power button will take a screen shot. This is stored as a JPEG in the root directory of the device. You can copy that from the device the next time you connect to the PC. They will also get added to the device library the next time new books are processed.
davidfor is offline   Reply With Quote
Old 09-13-2013, 07:38 AM   #7
ibu
Addict
ibu can illuminate an eclipseibu can illuminate an eclipseibu can illuminate an eclipseibu can illuminate an eclipseibu can illuminate an eclipseibu can illuminate an eclipseibu can illuminate an eclipseibu can illuminate an eclipseibu can illuminate an eclipseibu can illuminate an eclipseibu can illuminate an eclipse
 
Posts: 201
Karma: 8170
Join Date: Feb 2010
Location: Berlin, Germany
Device: iPhone 4S, Kobo Glo
@davidfor

Thanks! Works perfectly!
ibu 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 05:50 AM.


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