mirror of
https://github.com/NaitLee/Cat-Printer.git
synced 2025-05-16 07:10:30 -07:00
replace with fatal error
This commit is contained in:
parent
2e152c2bd4
commit
a025d3ac5f
@ -597,8 +597,8 @@ def magick_text(stdin, image_width, font_size, font_family):
|
||||
'Pipe an io to ImageMagick for processing text to image, return output io'
|
||||
read_fd, write_fd = os.pipe()
|
||||
if _MagickExe is None:
|
||||
error(i18n("imagemagick-not-found"))
|
||||
exit(129)
|
||||
fatal(i18n("imagemagick-not-found"), code=129)
|
||||
|
||||
subprocess.Popen([_MagickExe, '-background', 'white', '-fill', 'black',
|
||||
'-size', f'{image_width}x', '-font', font_family, '-pointsize',
|
||||
str(font_size), 'caption:@-', 'pbm:-'],
|
||||
@ -609,8 +609,8 @@ def magick_image(stdin, image_width, dither):
|
||||
'Pipe an io to ImageMagick for processing "usual" image to pbm, return output io'
|
||||
read_fd, write_fd = os.pipe()
|
||||
if _MagickExe is None:
|
||||
error(i18n("imagemagick-not-found"))
|
||||
exit(129)
|
||||
fatal(i18n("imagemagick-not-found"), code=129)
|
||||
|
||||
subprocess.Popen([_MagickExe, '-', '-fill', 'white', '-opaque', 'transparent',
|
||||
'-resize', f'{image_width}x', '-dither', dither, '-monochrome', 'pbm:-'],
|
||||
stdin=stdin, stdout=io.FileIO(write_fd, 'w'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user