remove deprecation
This commit is contained in:
parent
1d7cb76dd0
commit
23141d82a0
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
from distutils.spawn import find_executable
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import math
|
import math
|
||||||
import inkex
|
import inkex
|
||||||
@ -173,10 +172,10 @@ class JPEGExport(inkex.EffectExtension):
|
|||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
outfile = outfile.replace("\\","\\\\")
|
outfile = outfile.replace("\\","\\\\")
|
||||||
# set the ImageMagick command to run based on what's installed
|
# set the ImageMagick command to run based on what's installed
|
||||||
if find_executable('magick'):
|
if shutil.which('magick'):
|
||||||
command = "magick \"%sjpinkexp.png\" -sampling-factor 4:4:4 -strip -interlace JPEG -colorspace RGB -quality %s -density %s \"%s\" " % (tmp, self.options.quality, self.options.density, outfile)
|
command = "magick \"%sjpinkexp.png\" -sampling-factor 4:4:4 -strip -interlace JPEG -colorspace RGB -quality %s -density %s \"%s\" " % (tmp, self.options.quality, self.options.density, outfile)
|
||||||
# inkex.utils.debug(command)
|
# inkex.utils.debug(command)
|
||||||
elif find_executable('convert'):
|
elif shutil.which('convert'):
|
||||||
command = "convert \"%sjpinkexp.png\" -sampling-factor 4:4:4 -strip -interlace JPEG -colorspace RGB -quality %s -density %s \"%s\" " % (tmp, self.options.quality, self.options.density, outfile)
|
command = "convert \"%sjpinkexp.png\" -sampling-factor 4:4:4 -strip -interlace JPEG -colorspace RGB -quality %s -density %s \"%s\" " % (tmp, self.options.quality, self.options.density, outfile)
|
||||||
# inkex.utils.debug(command)
|
# inkex.utils.debug(command)
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user