Apache OpenOffice (AOO) Bugzilla – Issue 31102
Reducing the patch set for libjpeg
Last modified: 2004-09-17 16:27:45 UTC
Attached is two patches to use libjpeg without hacking libjpeg sources so much, i.e. implement a source and destination manager to use SvStreams, rather than modify libjpeg directly to do that. cmc->sj: what do you think ? Long term I'm thinking about using the system jpeg libraries, but for now I'm just interested in shrinking the jpeg patch in the OOo cvs down to the bits that are really needed.
Created attachment 16268 [details] patch to jpeg module
Created attachment 16269 [details] patch to svtools module
cmc->sj: Do you think this is a good idea ?, if so bounce it back to me and I can commit in these changes.
As long as we need to modifiy the jpeg library itself we will not get rid of the patch, I am thinking of the requirement that we are currently changing the red and blue color component, without changing this in the jpeg library itself the scanlines can't be used directly with our bitmap object. Another problem seems to be that the jpeg library interface may vary between each Linux and this would raise the requirements to install OOo (And I am not sure what to do on Windows). Using the a manager instead of directly hacking jpeg sources sounds good, but please be careful not to break any functionality, the patch should be tested a lot. Sven
Yeah, the RGB order to BGR change would requre that the swapping be done by OOo rather than by the patched libjpeg as it is currently, but that's not too hard. The real problem in trying to use a system jpeg is the additional CMYK to RGB support that OOo has in its libjpeg that isn't available otherwise. But you never know.
done
This checkin to 0704 broke the build for W32. Adding Sander to the cc's because he wanted to close the branch tomorrow. in svtools/source/filter.vcl/jpeg/jpeg.cxx you added an include for jpeglib.h, this fails with: guw.pl /cygdrive/c/PROGRA~1/MICROS~1.NET/Vc7/bin/cl.exe @/tmp/mkb01860 jpeg.cxx d:\v1\cws_src680_ooo20040704\solver\680\wntmsci8.pro\inc\external\jpeglib.h(910) : error C2061: Syntaxfehler : Bezeichner 'FILE' d:\v1\cws_src680_ooo20040704\solver\680\wntmsci8.pro\inc\external\jpeglib.h(911) : error C2061: Syntaxfehler : Bezeichner 'FILE' dmake: Error code 2, while making '../../../wntmsci8.pro/slo/jpeg.obj'
Fixed with: +++ svtools/source/filter.vcl/jpeg/jpeg.cxx 10 Jul 2004 13:41:50 -0000 @@ -61,6 +61,7 @@ extern "C" { + #include "stdio.h" #include "jpeg.h" #include "jpeglib.h" #include "jerror.h"
closed, fixed long time