Closed GoogleCodeExporter closed 9 years ago
I think that I've fixed the issue: take a look at utils.py, we have:
def imagemagick_version():
"""Return the version of ImageMagick that's currently installed,
as a dotted string of numbers (e.g. '6.3.5.10').
"""
command = 'convert -list configure | grep ^LIB_VERSION_NUMBER'
lines = os.popen(command).readlines()
return lines[0].split()[1].replace(',', '')
def get_listtype():
"""Return argument for finding ImageMagick's list of fonts,
based on the version of IM installed.
"""
if imagemagick_version() >= '6357':
listarg = 'font'
else:
listarg = 'type'
return listarg
The code is very well commented, so I pay attention to these words:
"...dotted string of numbers (e.g. '6.3.5.10')."
So I saw that the line:
if imagemagick_version() >= '6357':
isn't using the correct expression (typos for sure) because are missing the
'dots';
so I've just changed the line to:
if imagemagick_version() >= '6.3.5.7':
and so todiscgui is now working correctly.
JFYI.
Regards,
Original comment by dan...@gmail.com
on 7 Nov 2007 at 12:10
The bug is that I didn't allow for a LIB_VERSION_NUMBER where the last field is
greater than 9, so your IM version is returning 63510
Your solution of changing it to decimals is not going to help as 6.3.5.7 is not
amenable to the type of comparison we are doing. The doc string was just an
omission - I didn't change the doc string from the original fuction when I
made my
first changes.
Wapcaplet has commited an solution to svn that leaves the commas and uses list
comparison, which seems to me to be quite elegant.
svn up and thanks for the bug report :)
grepper
Original comment by grepper@gmail.com
on 7 Nov 2007 at 4:42
Original comment by grepper@gmail.com
on 7 Nov 2007 at 4:52
Original issue reported on code.google.com by
dan...@gmail.com
on 6 Nov 2007 at 11:38