From: jerome <rom...@ya...> - 2014-12-11 15:41:45
|
For me, it is fixed on gramps41, with: diff --git a/gramps/gen/utils/image.py b/gramps/gen/utils/image.py index e9cda4c..14df7d0 100644 --- a/gramps/gen/utils/image.py +++ b/gramps/gen/utils/image.py @@ -100,7 +100,7 @@ def resize_to_jpeg(source, destination, width, height, crop=None): (width, height) = image_actual_size(width, height, img.get_width(), img.get_height()) scaled = img.scale_simple(int(width), int(height), GdkPixbuf.InterpType.BILINEAR) - scaled.savev(destination, "jpeg" "", "") + scaled.savev(destination, "jpeg" "", "", "") After fixing this missing argument, I do not need the try/except on docgen.htmldoc anymore! i.e. resize_to_jpeg() works fine. Maybe this was added for something else??? diff --git a/gramps/plugins/docgen/htmldoc.py b/gramps/plugins/docgen/htmldoc.py index 4a46d5a..2319050 100644 --- a/gramps/plugins/docgen/htmldoc.py +++ b/gramps/plugins/docgen/htmldoc.py @@ -548,12 +548,7 @@ class HtmlDoc(BaseDoc, TextDoc): imdir = self._backend.datadirfull() - try: - resize_to_jpeg(name, imdir + os.sep + refname, size, size, crop=crop) - except: - LOG.warn(_("Could not create jpeg version of image %(name)s") % - {'name' : name}) - return + resize_to_jpeg(name, imdir + os.sep + refname, size, size, crop=crop) regards, Jérôme (2) HTML output doesn't produce a picture for any of the reports, giving the "Could not create jpeg version of image...". Presumably there is a problem in resize_to_jpeg(name, imdir + os.sep + refname, size, size, crop=crop) but I can't begin to debug this as I don't even know what modules are executed for this. regards, Tim. -- View this message in context: http://gramps.1791082.n4.nabble.com/cairodoc-odt-rtf-backends-and-image-width-tp4668028p4668048.html Sent from the GRAMPS - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ Gramps-devel mailing list Gra...@li... https://lists.sourceforge.net/lists/listinfo/gramps-devel |