| 
			
			 | 
		#1 | 
| 
			
			
			
			 Member 
			
			![]() Posts: 10 
				Karma: 10 
				Join Date: Apr 2015 
				
				
				
				Device: EZReader 
				
				
				 | 
	
	
	
		
		
			
			 
				
				Kindle Touch-open specific image by command line
			 
			
			
			Hello, 
		
	
		
		
		
		
		
		
		
		
		
		
		
			I intend to control opening images stored on kindle touch (images folder) by one script. With that need, i try to understand Kindle command to open specific images instead of manual action (tap on images). I see that running usr/bin/imageviewer.sh behaves like opening Images folder, then i have to tap on image to open it Do you have any advice to do this or any similar packages to perform to open specific images? Appreciate for your help P/S: i see kindle always returns following event when i touch/tap on images after running command udevadm monitor --property. Honestly, i do not understand and if we can utilize these information in making script to open specific image? Code: 
	KERNEL[1451380348.330980] change /devices/platform/zforce.0/input/input4 (input) UDEV_LOG=3 ACTION=change DEVPATH=/devices/platform/zforce.0/input/input4 SUBSYSTEM=input ZForce=touch PRODUCT=0/0/0/0 NAME="zforce" PHYS="zforce/input0" EV==b KEY==6420 0 0 0 0 0 0 0 0 0 3 ABS==2608000 3 MODALIAS=input:b0000v0000p0000e0000-e0,1,3,k145,14A,14D,14E,ra0,1,2F,35,36,39,mlsfw SEQNUM=1970 UDEV [1451380348.332288] change /devices/platform/zforce.0/input/input4 (input) UDEV_LOG=3 ACTION=change DEVPATH=/devices/platform/zforce.0/input/input4 SUBSYSTEM=input ZForce=touch PRODUCT=0/0/0/0 NAME="zforce" PHYS="zforce/input0" EV==b KEY==6420 0 0 0 0 0 0 0 0 0 3 ABS==2608000 3 MODALIAS=input:b0000v0000p0000e0000-e0,1,3,k145,14A,14D,14E,ra0,1,2F,35,36,39,mlsfw SEQNUM=1970 KERNEL[1451380348.432021] change /devices/platform/zforce.0/input/input4 (input) UDEV_LOG=3 ACTION=change DEVPATH=/devices/platform/zforce.0/input/input4 SUBSYSTEM=input ZForce=notouch PRODUCT=0/0/0/0 NAME="zforce" PHYS="zforce/input0" EV==b KEY==6420 0 0 0 0 0 0 0 0 0 3 ABS==2608000 3 MODALIAS=input:b0000v0000p0000e0000-e0,1,3,k145,14A,14D,14E,ra0,1,2F,35,36,39,mlsfw SEQNUM=1971 UDEV [1451380348.432332] change /devices/platform/zforce.0/input/input4 (input) UDEV_LOG=3 ACTION=change DEVPATH=/devices/platform/zforce.0/input/input4 SUBSYSTEM=input ZForce=notouch PRODUCT=0/0/0/0 NAME="zforce" PHYS="zforce/input0" EV==b KEY==6420 0 0 0 0 0 0 0 0 0 3 ABS==2608000 3 MODALIAS=input:b0000v0000p0000e0000-e0,1,3,k145,14A,14D,14E,ra0,1,2F,35,36,39,mlsfw SEQNUM=1971 Last edited by eschwartz; 01-04-2016 at 04:46 AM. Reason: add code tags  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 Member 
			
			![]() Posts: 10 
				Karma: 10 
				Join Date: Apr 2015 
				
				
				
				Device: EZReader 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Finally, i see command eips can serve for my purpose 
		
	
		
		
		
		
		
		
		
		
		
		
	
	To load one image (600x800), i use eips -g /path/to/image/file To clear screen, use eips -c Before that, i use lipc-set-prop com.lab126.powerd preventScreenSaver 1 to disable screen saver This works on my kindle touch firmware 5.3.7.3  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#3 | 
| 
			
			
			
			 Ex-Helpdesk Junkie 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421 
				Karma: 85400180 
				Join Date: Nov 2012 
				Location: The Beaten Path, USA, Roundworld, This Side of Infinity 
				
				
				Device: Kindle Touch fw5.3.7 (Wifi only) 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			I think that is it. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	I have seen other hacks that print images using eips, but I haven't seen anyone using the Kindle's native ImageViewer that way. FWIW, use eips -f -g (for full update) And you can save and restore whatever used to be on the screen by cat'ing to/from /dev/fb0 <--> temporary file.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 BLAM! 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506 
				Karma: 26047202 
				Join Date: Jun 2010 
				Location: Paris, France 
				
				
				Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			For a real-world example of what @eschwartz just described, see the "Preview Current Screensaver" code in the ScreenSavers Hack's KUAL extension  
		
	
		
		
		
		
		
		
		
		
		
		
	
	 .
		 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | 
| 
			
			
			
			 Member 
			
			![]() Posts: 10 
				Karma: 10 
				Join Date: Apr 2015 
				
				
				
				Device: EZReader 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Thanks eschwartz, combine option -f in when clear screen resolves my current issue. eips -f -c this reduce pattern/outline of previous image after being cleared 
		
	
		
		
		
		
		
		
		
		
		
		
	
	One thing i still have not finalize is the image format/property put on kindle screen. Is it 600 width * 800 height, grayscale ? I tried new image created from GIMP with mentioned info (600*800, grayscale) but it does not display at correct position (center) as i supposed. Any other image format i miss here? An image- got from other kindle project (https://github.com/mpetroff/kindle-w...master/kindle/), which is displayed very fit on kindle. Thanks  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#6 | 
| 
			
			
			
			 Ex-Helpdesk Junkie 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421 
				Karma: 85400180 
				Join Date: Nov 2012 
				Location: The Beaten Path, USA, Roundworld, This Side of Infinity 
				
				
				Device: Kindle Touch fw5.3.7 (Wifi only) 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			600x800 images *should* display covering the entire screen perfectly. 
		
	
		
		
		
		
		
		
		
		
		
		
		
			It will expect a PNG. What image are you using (upload it please, our "Go Advanced" reply mode comes with a free attachments feature) and what unexpected results are you getting? Last edited by eschwartz; 01-10-2016 at 03:25 AM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#7 | 
| 
			
			
			
			 BLAM! 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506 
				Karma: 26047202 
				Join Date: Jun 2010 
				Location: Paris, France 
				
				
				Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			eips is *very* finicky. It expects a PNG8 with a 256c palette. Be careful when dithering down to 16c, since that (logically) tends to produce a 16c palette, which eips doesn't handle. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	I usually use ImageMagick to handle that, the full commandline has been posted a few times around here (besides being in the ScreenSavers Hack)  .
		 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#8 | 
| 
			
			
			
			 Member 
			
			![]() Posts: 10 
				Karma: 10 
				Join Date: Apr 2015 
				
				
				
				Device: EZReader 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Yes, my image is *.png. I attach my image here for reference 
		
	
		
		
		
		
		
		
		
		
		
		
	
	@NiLuJe, could you help forward the link, i search some but could not find. Sorry for this Is below command correct convert filename.png -depth 8 converted_file.png?  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#9 | 
| 
			
			
			
			 Member 
			
			![]() Posts: 10 
				Karma: 10 
				Join Date: Apr 2015 
				
				
				
				Device: EZReader 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Oops, include attachment
		 
		
	
		
		
			 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#10 | 
| 
			
			
			
			 Going Viral 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212 
				Karma: 18210809 
				Join Date: Feb 2012 
				Location: Central Texas 
				
				
				Device: No K1, PW2, KV, KOA 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			File is not 600 w x 800 h 
		
	
		
		
		
		
		
		
		
		
		
		
	
	it is indexed two color  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#11 | 
| 
			
			
			
			 BLAM! 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506 
				Karma: 26047202 
				Join Date: Jun 2010 
				Location: Paris, France 
				
				
				Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			@thaonphuong: latest occurence. The palette also ships w/ the ScreenSavers hack. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	Tweak the screen size as needed, of course   (careful, it's specified two times, one for the image, and one for the letterboxing).
		 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#12 | 
| 
			
			
			
			 Member 
			
			![]() Posts: 10 
				Karma: 10 
				Join Date: Apr 2015 
				
				
				
				Device: EZReader 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			it displays very well on my kindle touch 
		
	
		
		
		
		
		
		
		
		
		
		
	
	convert in_filename.png -filter LanczosSharp -resize 300x400 -background white -gravity center -extent 600x800 -colorspace Gray -dither FloydSteinberg -quality 75 -define png:color-type=0 -define png:bit-depth=8 out_filename.png Next step i will perform above command in batch, yeah. Many thanks NiLuJe for your help  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
    
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Strange, specific bug rendering centered text w/ p class command in Nook touch | ljcblue | ePub | 2 | 05-23-2014 01:43 PM | 
| [Solved] Open Library Command-line | tanstaafl1963 | Library Management | 2 | 01-05-2014 11:48 PM | 
| Is there a way around the country specific restrictions for the Kindle Touch? | tradingbr | Kindle Developer's Corner | 9 | 05-18-2012 01:07 AM | 
| Kindle free book: Intelligence Was My Line: Inside Eisenhower's Other Command | greencat | Deals and Resources (No Self-Promotion or Affiliate Links) | 0 | 06-15-2011 05:04 AM | 
| Launching Kindle Previewer from command line? | GRiker | Kindle Developer's Corner | 4 | 01-29-2011 09:00 PM |