View Single Post
Old 03-09-2014, 10:02 AM   #1
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Using image in plugin code

In the Prince PDF plugin I use two small images in the "about" dialog (second screnshot in that thread). However, I just noticed it doesn't work. In fact, the images are not read from the plugin file, but from the current directory, so I only see the images if I launch calibre from the directory where I'm developing the plugin (that's why I thought it worked before).

What I want is using the images in HTML code, which currently looks something like this:

Code:
<p style="margin:1em 0 0 0"><img src=":images/prince_icon.png"/> <i>Prince is copyrighted &copy; YesLogic Pty. Ltd.</i></p>
<p style="margin:0"><img src=":images/small_icon.png"/> This plugin is released under GPL v3.</p>
Is there some other way to write the src attribute such that it reads the images from the plugin file?
Jellby is offline   Reply With Quote