From 79e74c3e3601b76cd95d1c8c40f6d6e4040287de Mon Sep 17 00:00:00 2001 From: Marcin Deranek Date: Sun, 8 Mar 2020 02:21:01 +0100 Subject: Epson scanning software --- .../iscan/files/iscan-3.62.0-ijg-libjpeg.patch | 45 ++++++++++++++++++ .../iscan/files/iscan-3.62.0-imagemagick-7.patch | 54 ++++++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 media-gfx/iscan/files/iscan-3.62.0-ijg-libjpeg.patch create mode 100644 media-gfx/iscan/files/iscan-3.62.0-imagemagick-7.patch (limited to 'media-gfx/iscan/files') diff --git a/media-gfx/iscan/files/iscan-3.62.0-ijg-libjpeg.patch b/media-gfx/iscan/files/iscan-3.62.0-ijg-libjpeg.patch new file mode 100644 index 0000000..2625741 --- /dev/null +++ b/media-gfx/iscan/files/iscan-3.62.0-ijg-libjpeg.patch @@ -0,0 +1,45 @@ +--- a/filters/jpeg.cpp ++++ b/filters/jpeg.cpp +@@ -410,13 +410,13 @@ + cinfo_.image_height = ctx_.height (); + + jpeg_set_defaults (&cinfo_); +- jpeg_set_quality (&cinfo_, quality_, true); ++ jpeg_set_quality (&cinfo_, quality_, TRUE); + + cinfo_.density_unit = 1; // in dpi + cinfo_.X_density = ctx_.x_resolution (); + cinfo_.Y_density = ctx_.y_resolution (); + +- jpeg_start_compress (&cinfo_, true); ++ jpeg_start_compress (&cinfo_, TRUE); + + cache_ = new octet[ctx_.octets_per_line ()]; + cache_size_ = ctx_.octets_per_line (); +@@ -462,7 +462,7 @@ + dmgr_.next_output_byte = jbuf_ + (jbuf_size_ - n); + dmgr_.free_in_buffer = n; + +- return true; ++ return TRUE; + } + + void +@@ -535,7 +535,7 @@ + + //jpegデータの一部が分割されて送られてきても正常に動作するように変更 + +- return false; ++ return FALSE; + } + + void +@@ -580,7 +580,7 @@ + { + if (!header_done_) + { +- if (JPEG_SUSPENDED == jpeg_read_header (&cinfo_, true)) ++ if (JPEG_SUSPENDED == jpeg_read_header (&cinfo_, TRUE)) + { + log::trace ("jpeg_read_header suspended"); + if (!reclaim_space ()) diff --git a/media-gfx/iscan/files/iscan-3.62.0-imagemagick-7.patch b/media-gfx/iscan/files/iscan-3.62.0-imagemagick-7.patch new file mode 100644 index 0000000..9d345a2 --- /dev/null +++ b/media-gfx/iscan/files/iscan-3.62.0-imagemagick-7.patch @@ -0,0 +1,54 @@ +From 222aa3e123ee771d8997f6931997e3143186e0d6 Mon Sep 17 00:00:00 2001 +From: sirjaren +Date: Tue, 20 Feb 2018 13:35:46 -0600 +Subject: [PATCH] media-gfx/utsushi: ImageMagick deskew/crop support + +Fixes to allow utsushi to be built with --magick-pp. According to: + https://github.com/utsushi/utsushi/issues/43 + +The API changes from ImageMagick 6 to 7 means build failures as there +are old API's in use. It seems, that these API's are not actually used +(as in GraphicsMagick doesn't use them), so it may be ok to disable the +checks for them in 'doc-locate.cpp'. + +This is not yet confirmed, but allows building and using deskew in my +own testing. +--- + .../files/utsushi-9999-magick-pp.patch | 33 ++++++++++ + 4 files changed, 111 insertions(+), 8 deletions(-) + create mode 100644 media-gfx/utsushi/files/utsushi-9999-boost.patch + create mode 100644 media-gfx/utsushi/files/utsushi-9999-magick-pp.patch + +diff --git a/filters/doc-locate.cpp b/filters/doc-locate.cpp +index 4b09b29..4508274 100644 +--- a/filters/doc-locate.cpp ++++ b/filters/doc-locate.cpp +@@ -260,17 +260,17 @@ public: + clone.rotate (deskew_angle ()); + + Magick::Geometry rv = bbox (clone); +- if (HAVE_IMAGE_MAGICK_PP) +- { +- if (clone.page ().xNegative ()) +- rv.xOff (rv.xOff () - clone.page ().xOff()); +- else +- rv.xOff (rv.xOff () + clone.page ().xOff()); +- if (clone.page ().yNegative ()) +- rv.yOff (rv.yOff () - clone.page ().yOff()); +- else +- rv.yOff (rv.yOff () + clone.page ().yOff()); +- } ++ /*if (HAVE_IMAGE_MAGICK_PP) ++ *{ ++ * if (clone.page ().xNegative ()) ++ * rv.xOff (rv.xOff () - clone.page ().xOff()); ++ * else ++ * rv.xOff (rv.xOff () + clone.page ().xOff()); ++ * if (clone.page ().yNegative ()) ++ * rv.yOff (rv.yOff () - clone.page ().yOff()); ++ * else ++ * rv.yOff (rv.yOff () + clone.page ().yOff()); ++ }*/ + return scale (rv); + } + -- cgit v1.2.3