View Single Post
Old 11-13-2015, 07:47 AM   #2
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
[Plugin] PasteImage - Adds images from the clipboard

Updated: December 22, 2015
Current Version: "0.2.1"

This is a very simple image pasting plugin that'll add clipboard images to the currently loaded epub as .jpg images (regardless of the original format).

Installation:

Select Plugins > Manage Plugins > Add Plugin > PasteImage.zip

If you're using the Windows version of Sigil 0.9.0 (or higher) select Use Bundled Python. If you're using an older Sigil version, you'll need to install a Python interpreter and the Pillow package. To install Pillow open an admin command prompt and enter the following command:

Code:
pip install Pillow
The Linux version of the plugin requires the gtk Python package and the gtk libraries. (Both gtk2 and gtk3 are supported.)

Unfortunately, the plugin is not fully compatible with OSX. You can't copy images via the system clipboard, however, you can copy images via browser image URLs. (Right-click the image in the browser and select Copy Image Location/URL.)

Usage:

Copy an image or an image URL to the clipboard and select Plugins > Edit > PasteImage.

Known issues:

The plugin won't work with all apps. For example, you can't paste images copied from Google Chrome (Firefox works). You also might get a "Pillow import error" message even though Pillow is installed, if Pillow can't handle the image.
The jpeg image quality is hard-coded, but it can easily be changed by editing the quality value in plugin.py.

License: GNU General Public License v3 (GPL-3)
Attached Files
File Type: zip PasteImage_v0.2.1.zip (1.7 KB, 2831 views)

Last edited by Doitsu; 08-16-2017 at 03:11 AM. Reason: New version with autostart enabled (Sigil 0.9.3+ required)
Doitsu is offline   Reply With Quote