View Single Post
Old 10-26-2015, 10:07 AM   #1
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Calibre plugin image resources

I'm trying to convert a Python script (run via calibre-debug -e) to a plugin and am having a bit of trouble translating the image processing.

In the script I was using:

Code:
dummyimg = Image()
dummyimg.open(path_to_img_on_PC)
dummyimg.size = (wid, hgt)
dummyimg.save(path_to_exploded_ebook_image)
In the plugin:
In previous plugins, using the 'copy-something-someone-else-did' method, I've used code in the genesis method like
Code:
self.icons = get_icons(['images/plugin_icon.png', 'images/pic1.png', ...])
to pass icons to the plugin, but this time the images are not going to be used as QIcons.

Does the way I pass the images to the plugin need to change in genesis or do I need a way of converting the QIcon() data from get_resources('images/pic1.png') to an instance of Image() ?

Advice, please
jackie_w is offline   Reply With Quote