summary refs log tree commit diff
path: root/pkgs/misc/drivers/hplip/image-processor.patch
blob: 30df1d29d97ec0d0832fb7c4a68e5ef7de7230df (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
From 207aa582477dd874d1651db2d0654c5d6adb6e0a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
Date: Fri, 20 Dec 2019 13:13:52 +0000
Subject: [PATCH] remove imageprocessor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
---
 Makefile.am                  |  4 ++--
 Makefile.in                  |  2 +-
 prnt/hpcups/HPCupsFilter.cpp | 19 -------------------
 3 files changed, 3 insertions(+), 22 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 891660d..484a051 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -166,7 +166,7 @@ if !HPLIP_CLASS_DRIVER
 dist_hplip_SCRIPTS = hpssd.py __init__.py hpdio.py
 endif #HPLIP_CLASS_DRIVER
 
-dist_noinst_DATA += prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template prnt/hpcups/libImageProcessor-x86_64.so prnt/hpcups/libImageProcessor-x86_32.so
+dist_noinst_DATA += prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template
 dist_noinst_SCRIPTS += dat2drv.py install.py  hplip-install init-suse-firewall init-iptables-firewall class_rpm_build.sh hplipclassdriver.spec createPPD.sh Makefile_dat2drv hpijs-drv
 
 if !HPLIP_CLASS_DRIVER
@@ -594,7 +594,7 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilter.cpp prnt/hpcups/HPCupsFilter.h prnt/hp
 	prnt/hpcups/ImageProcessor.h
 
 hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS)
-hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lImageProcessor -lcups -lcupsimage -lz $(DBUS_LIBS)
+hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lcups -lcupsimage -lz $(DBUS_LIBS)
 #else
 #hpcupsdir = $(cupsfilterdir)
 #hpcups_PROGRAMS = hpcups
diff --git a/Makefile.in b/Makefile.in
index 16c39f0..46a767e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -4814,7 +4814,7 @@ libapdk_la_CFLAGS = $(libapdk_la_CXXFLAGS) -Iprnt/hpijs
 @HPCUPS_INSTALL_TRUE@	prnt/hpcups/ImageProcessor.h
 
 @HPCUPS_INSTALL_TRUE@hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS)
-@HPCUPS_INSTALL_TRUE@hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lImageProcessor -lcups -lcupsimage -lz $(DBUS_LIBS)
+@HPCUPS_INSTALL_TRUE@hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lcups -lcupsimage -lz $(DBUS_LIBS)
 #else
 #hpcupsdir = $(cupsfilterdir)
 #hpcups_PROGRAMS = hpcups
diff --git a/prnt/hpcups/HPCupsFilter.cpp b/prnt/hpcups/HPCupsFilter.cpp
index 5b282d8..153ee3a 100644
--- a/prnt/hpcups/HPCupsFilter.cpp
+++ b/prnt/hpcups/HPCupsFilter.cpp
@@ -31,7 +31,6 @@
 \*****************************************************************************/
 
 #include "HPCupsFilter.h"
-#include "ImageProcessor.h"
 
 #include <signal.h>
 #include <sys/wait.h>
@@ -637,16 +636,10 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
 
 
     sprintf(hpPreProcessedRasterFile, "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name);
-    image_processor_t* imageProcessor = imageProcessorCreate();
 
     while (cupsRasterReadHeader2(cups_raster, &cups_header))
     {
 
-        IMAGE_PROCESSOR_ERROR result = imageProcessorStartPage(imageProcessor, &cups_header);
-        if (result != IPE_SUCCESS){
-            dbglog("DEBUG: imageProcessorStartPage failed result = %d\n", result);
-        }
-
         current_page_number++;
 
         if (current_page_number == 1) {
@@ -745,11 +738,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
             color_raster = rgbRaster;
             black_raster = kRaster;
 
-            result = imageProcessorProcessLine(imageProcessor, m_pPrinterBuffer, cups_header.cupsBytesPerLine);
-            if (result != IPE_SUCCESS){
-                dbglog("DEBUG: imageProcessorProcessLine failed result = %d\n", result);
-            }
-
 
             if ((y == 0) && !is_ljmono) {
                 //For ljmono, make sure that first line is not a blankRaster line.Otherwise printer
@@ -780,11 +768,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
             }
         }  // for() loop end
 
-        result = imageProcessorEndPage(imageProcessor);
-        if (result != IPE_SUCCESS){
-                dbglog("DEBUG: imageProcessorEndPage failed result = %d\n", result);
-        }
-
 
         m_Job.NewPage();
         if (err != NO_ERROR) {
@@ -800,8 +783,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
         rgbRaster = NULL;
     }
 
-    imageProcessorDestroy(imageProcessor);
-
     unlink(hpPreProcessedRasterFile);
     return ret_status;
 }
-- 
2.24.1