Re: [PATCH] Re: How to setup image converters on Mac?

2017-09-24 Thread Enrico Forestieri
On Sun, Sep 24, 2017 at 12:24:26PM +0200, Stephan Witt wrote:
> 
> This is the solution I’d like to propose. It’s not tested on Linux and
> Windows.
> 
> The idea is to add imgconvert as fallback-converter for SVG to PDF and PNG to
> PDF.
> At the moment it uses the Qt library routines for image processing. I’ll plan
> to investigate how to integrate libcairo for real vector graphics conversion.
> 
> I’d like to hear your comments.

I think it is fine. However, I would avoid introducing 2 more converters
and instead I would modify convertDefault.py so that when imagemagick is
not installed the new imgconvert command is used.

In this way, whatever conversion between image formats supported by Qt
would succeed (without the need of new converter definitions).

-- 
Enrico


Re: [PATCH] Re: How to setup image converters on Mac?

2017-09-24 Thread Stephan Witt
Am 24.09.2017 um 12:24 schrieb Stephan Witt :
> 
> Am 21.09.2017 um 15:08 schrieb Stephan Witt :
>> 
>> Am 21.09.2017 um 14:54 schrieb Enrico Forestieri :
>>> 
>>> On Thu, Sep 21, 2017 at 11:43:29AM +0200, Stephan Witt wrote:
 
 My question (again): how can I circumvent this and configure „my“ converter
 so it’s used to convert the SVG to PNG and run pdflatex with the PNG 
 instead
 of the PDF (which would be rasterized anyway, when ImageMagick is used for
 SVG to PDF conversion).
>>> 
>>> Maybe you can use again Qt to convert the SVG to a rasterized PDF.
>>> See the attached example. Note that this is not actually limited
>>> to SVG but is able to convert to PDF any format natively understood
>>> by Qt (even if the original vector format is lost).
>> 
>> Thank you. That’s not the solution I’d expected. But of course I’ll try that.
>> I’d combine your code snippets into a single converter utility if it works.
>> 
>> I’ll keep you up-to-date. :)
> 
> This is the solution I’d like to propose. It’s not tested on Linux and 
> Windows.
> 
> The idea is to add imgconvert as fallback-converter for SVG to PDF and PNG to 
> PDF.
> At the moment it uses the Qt library routines for image processing. I’ll plan
> to investigate how to integrate libcairo for real vector graphics conversion.
> 
> I’d like to hear your comments.
> 
> Stephan
> 
> <0001-imgconvert.patch>

Sorry, I made a last minute change and put a logic error in imgconvert.cpp.
The check for to pdf or not to pdf was wrong.

Here is the corrected version.

Stephan



0002-imgconvert.patch
Description: Binary data