-scale-to only takes 1 size, so choose the smallest

This commit is contained in:
Rodney Ewing 2013-08-14 12:13:06 -07:00
parent d4380b52b6
commit 7a89d27c80

View File

@ -275,7 +275,7 @@ class CommonPdfProcessor(MediaProcessor):
'{basename}.thumbnail'))
executable = where('pdftocairo')
args = [executable, '-scale-to', str(thumb_size),
args = [executable, '-scale-to', str(min(thumb_size)),
'-singlefile', '-png', self.pdf_filename, thumb_filename]
_log.debug('calling {0}'.format(repr(' '.join(args))))
@ -320,7 +320,7 @@ class CommonPdfProcessor(MediaProcessor):
self.name_builder.fill('{basename}.medium'))
executable = where('pdftocairo')
args = [executable, '-scale-to', str(size),
args = [executable, '-scale-to', str(min(size)),
'-singlefile', '-png', self.pdf_filename, filename]
_log.debug('calling {0}'.format(repr(' '.join(args))))