| 
			
			 | 
		#1 | 
| 
			
			
			
			 Banned 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 272 
				Karma: 1224588 
				Join Date: Sep 2014 
				
				
				
				Device: Sony PRS 650 
				
				
				 | 
	
	
	
		
		
			
			 
				
				[Plugin] AddImgasSVG
			 
			
			
			Hi, 
		
	
		
		
		
		
		
		
		
		
		
		
		
			Doitsu has published a plugin to select an image which is then inserted as a complete new page wrapped in SVG to fill the entire screen retaining the aspect ratio. This is the same way the Add Cover menu item is working, but without adding the semantics. The original Version can be found here: https://www.mobileread.com/forums/sho...d.php?t=255300 At first some honorable mentions: 
 The way of publishing the enhanced version was Doitsu's proposal. What has been enhanced? 
 What is the disadvantage? My Version is Python >3 only. This and the PIL library are present when using Sigil > 0.9.1 using the internal python interpreter. If you still want to use Python 2.7 you need to install Doitsu's version which can be found in the thread linked above. Last edited by rubeus; 03-30-2016 at 05:26 AM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 Sigil Developer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,072 
				Karma: 6361556 
				Join Date: Nov 2009 
				
				
				
				Device: many 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			BTW, if all you need from PIL is image size info, you might want to check out the python code in KindleUnpack that handles generation of covers called mobi_cover.py. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	It can be found here: https://github.com/kevinhendricks/Ki.../mobi_cover.py There is a bug fixed image type identifier and the original image size routine that PIL used to create their version that was written by Draco. If you use that version, you may not need PIL at all.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#3 | 
| 
			
			
			
			 Banned 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 272 
				Karma: 1224588 
				Join Date: Sep 2014 
				
				
				
				Device: Sony PRS 650 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Using PIL offers the possibility to create an enhanced user interface showing thumbnails. Maybe in 5 years or so  
		
	
		
		
		
		
		
		
		
		
		
		
	
	 
		 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 Banned 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 272 
				Karma: 1224588 
				Join Date: Sep 2014 
				
				
				
				Device: Sony PRS 650 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			3 seconds after publishing the 010 version i got suggestions for new improvements  
		
	
		
		
		
		
		
		
		
		
		
		
		
			![]() Ok, here we go 
 Version 020 added to #1 Last edited by rubeus; 12-26-2015 at 11:51 AM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | 
| 
			
			
			
			 Banned 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 272 
				Karma: 1224588 
				Join Date: Sep 2014 
				
				
				
				Device: Sony PRS 650 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			New Version in #1 
		
	
		
		
		
		
		
		
		
		
		
		
	
	
  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#6 | 
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,625 
				Karma: 3120635 
				Join Date: Jan 2009 
				
				
				
				Device: Kindle PW3 (wifi) 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Hi 
		
	
		
		
		
		
		
		
		
		
		
		
		
			Thank you for your work. I did try it but it failed for a missing module. Code: 
	Statut :failed
Traceback (most recent call last):
  File "/usr/share/sigil/plugin_launchers/python/launcher.py", line 134, in launch
    target_script = __import__(script_module)
  File "/home/roger/.local/share/sigil-ebook/sigil/plugins/AddImgasSVG/plugin.py", line 9, in <module>
    from PIL import Image
ImportError: No module named 'PIL'
Error: No module named 'PIL'
Edit: I realize have version 0.1; I will install 03 and report back. Sorry Last edited by roger64; 01-10-2016 at 05:03 AM. Reason: edit  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#7 | 
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,625 
				Karma: 3120635 
				Join Date: Jan 2009 
				
				
				
				Device: Kindle PW3 (wifi) 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			I installed the brand new 0.3 (which is still reported as 0.2) but the error message is the same.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#8 | 
| 
			
			
			
			 Banned 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 272 
				Karma: 1224588 
				Join Date: Sep 2014 
				
				
				
				Device: Sony PRS 650 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Did you install PIL? Are you using the internal Python Interpreter?
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#9 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,763 
				Karma: 24088559 
				Join Date: Dec 2010 
				
				
				
				Device: Kindle PW2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Code: 
	sudo pip install Pillow Code: 
	sudo pip3 install Pillow  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#10 | 
| 
			
			
			
			 Banned 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 272 
				Karma: 1224588 
				Join Date: Sep 2014 
				
				
				
				Device: Sony PRS 650 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			This Version does not run with Python 2.7...
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#11 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,891 
				Karma: 207182180 
				Join Date: Jan 2010 
				
				
				
				Device: Nexus 7, Kindle Fire HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Keep in mind that the Linux version of Sigil does not have a bundled (internal) Python interpreter. Check out the BuildingOnLinux docs at github to see what additional Python modules you'll need to install to meet the minimum requirements for a basic Sigil plugin environment on Linux. 
		
	
		
		
		
		
		
		
		
		
		
		
		
			And in this case, since the developer indicates that his plugin does not support Python 2, you'll want to install the modules with pip3. Last edited by DiapDealer; 01-10-2016 at 09:30 AM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#12 | 
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,625 
				Karma: 3120635 
				Join Date: Jan 2009 
				
				
				
				Device: Kindle PW3 (wifi) 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Thank you all. I knew nothing about Mr PIL.  
		
	
		
		
			It works perfectly well with 3.4 -64 bits- (and the idea to place it either on first page, last page, page before or after is excellent). I joined a copy of what I had to install on Arch.I did not need to install the huge optional package (see screenshot). Last edited by roger64; 01-10-2016 at 09:41 AM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#13 | 
| 
			
			
			
			 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) 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Do note that I, the sigil-git AUR maintainer, explicitly listed python-pillow as an optdepends. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	With the message that it is one of several modules *recommended* if you are going to be using plugins. Please keep in mind when running plugins in Sigil on Arch Linux, that if you haven't installed the optdepends you may run into problems where plugins expect a module that you have *chosen* to skip installing. User centrism gives you the power to shoot yourself in the foot if you don't pay attention...  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#14 | 
| 
			
			
			
			 Sigil Developer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,072 
				Karma: 6361556 
				Join Date: Nov 2009 
				
				
				
				Device: many 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			FWIW, I strongly recommend these python3 packages be required not optional.  Sigil is going to start using its embedded python interpreter more to implement many of the epub3 related features.  Especially when it tries to implement support for fixed format epubs.  So even internal Sigil python code, not just plugins, will start to use those packages the way they use lxml right now.  It will also reduce the number of bug reports on linux like this one. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	Thanks, KevinH  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#15 | 
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,625 
				Karma: 3120635 
				Join Date: Jan 2009 
				
				
				
				Device: Kindle PW3 (wifi) 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			@KevinH, eschwartz 
		
	
		
		
		
		
		
		
		
		
		
		
	
	Thanks for the advice. I will install these optional packages.  
		 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
            
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| [GUI Plugin] KindleUnpack - The Plugin | DiapDealer | Plugins | 527 | 08-15-2025 02:36 PM | 
| [FileType Plugin] YVES Bible Plugin | ClashTheBunny | Plugins | 27 | 01-16-2023 02:25 AM | 
| Plugin not customizable: Plugin: HTML Output does not need customization | flyingfoxlee | Conversion | 2 | 02-24-2012 03:24 AM | 
| [GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 01:27 PM | 
| New Plugin Type Idea: Library Plugin | cgranade | Plugins | 3 | 09-15-2010 01:11 PM |