From 427983939f04f3545c91492d5119d4a3fd921239 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Thu, 12 Sep 2024 17:50:43 +0200 Subject: [PATCH] Replace `+matte` with `-alpha off` `+matte` is not available anymore in `v7`, being replaced by `-alpha off`. `-alpha off` is available since 2012 md5 checksum has been manually tested Refs: - ImageMagick/ImageMagick6@ce3516c - ImageMagick/ImageMagick#1974 --- lib/heathen/task.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/heathen/task.rb b/lib/heathen/task.rb index 3ad2bca..f54b992 100644 --- a/lib/heathen/task.rb +++ b/lib/heathen/task.rb @@ -54,13 +54,13 @@ def task_key action, mime_type end Heathen::Task.register 'ocr', 'image/.*' do - convert_image to: :tiff, params: '-depth 8 -density 300 -background white +matte' + convert_image to: :tiff, params: '-depth 8 -density 300 -background white -alpha off' job.reset_content_file! tesseract format: 'pdf' end Heathen::Task.register 'ocr_text', 'image/.*' do - convert_image to: :tiff, params: '-depth 8 -density 300 -background white +matte' + convert_image to: :tiff, params: '-depth 8 -density 300 -background white -alpha off' job.reset_content_file! tesseract format: nil end