Libjpeg for Win32

People have also been telling me that they are having trouble compiling libjpeg for win32 platforms. Here it is…

The version is available:

  • libjpeg.lib (6b)

    You’ll also need the include files, which are:

  • cderror.h
  • cdjpeg.h
  • jchuff.h
  • jconfig.h
  • jdct.h
  • jdhuff.h
  • jerror.h
  • jinclude.h
  • jmemsys.h
  • jmorecfg.h
  • jpegint.h
  • jpeglib.h
  • jversion.h
  • transupp.h

    There also also some handy tools, which are:

  • cjpeg.exe
  • djpeg.exe
  • jpegtran.exe
  • rdjpgcom.exe
  • wrjpgcom.exe

    The instructions for how to compile the library are as follows:

  • Uncompress the libjpeg distibution
  • Change into the jpeg-6b directory
  • Rename jconfig.vc to jconfig.h
  • nmake /f makefile.vc all
  • Done!

    All of this is also available as one big .zip file, as well as a gzipped tarball (both of which WinZip can open).

  • LZW decompression in Panda

    Several people have tried to convince me that decompression of LZW compressed information is not covered by the various Unisys patents on the LZW compression algorithm. This decompression would be useful for the reading in of existing PDF documents, as well as the inclusion of GIF images within a PDF document.

    Having now done some research on the topic, it would appear that this is incorrect. An example is xpdf which is forced to convert the LZW compressed streams into something else before they can be used. My reading of the LZW license is also that this is the case.

    Therefore, Panda will ont be supporting the inclusion of GIF images, or the the modification of PDF documents containing LZW compressed streams in the forseeable future. When the modification of such documents is supported, it will be implemented in a similar manner to that used in xpdf.

    Libtiff for Win32

    People have been telling me that they are having trouble compiling libtiff for win32 platforms, so I have decided to include a copy here.

    The versions available are:

  • libtiff.lib (3.5.4)
  • libtiff.dll (3.5.4) and the import library libtiff_i.lib

    You’ll also need the include files, which are:

  • g3states.h
  • t4.h
  • tif_dir.h
  • tif_fax3.h
  • tif_predict.h
  • tiff.h
  • tiffcomp.h
  • tiffconf.h
  • tiffio.h
  • tiffiop.h
  • uvcode.h
  • version.h

    There also also some handy tools, which are:

  • fax2ps.exe
  • fax2tiff.exe
  • gif2tiff.exe
  • pal2rgb.exe
  • ppm2tiff.exe
  • ras2tiff.exe
  • rgb2ycbcr.exe
  • thumbnail.exe
  • tiff2bw.exe
  • tiff2ps.exe
  • tiff2rgba.exe
  • tiffcmp.exe
  • tiffcp.exe
  • tiffdither.exe
  • tiffdump.exe
  • tiffinfo.exe
  • tiffmedian.exe
  • tiffsplit.exe

    The instructions for how to compile the library are as follows:

  • Uncompress the libtiff distibution
  • Change directory into the libtiff directory inside the distribution
  • Copy ..\contrib\winnt\fax3sm.c to fax3sm_winnt.c
  • Copy ..\contrib\winnt\libtiff.def to libtiff.def
  • Remove the line for TIFFModeCCITTFax3 from the libtiff.def file
  • Change the line for TIFFFlushdata1 in the libtiff.def file to TIFFFlushData1
  • nmake /f makefile.vc all
  • Done!

    To compile the tools once you have the library, just change into the tools directory and do a nmake /f makefile.vc

    All of this is also available as one big .zip file, as well as a gzipped tarball (both of which WinZip can open).

  • Comparison the PDF generation APIs

    I have been doing some surfing and thought the following summary of the capability of the various PDF creation APIs might be useful to others. I see Panda having all of the functionality listed below as it becomes more mature over time. Where possible, I have indicated a timeframe in which implemenation might occur.

    Feature Panda Stable Panda Future Adobe ClibPDF PDFLib UniSoft Imaging vividX
    Images: GIF N Never          
    Images: JPEG Y            
    Images: PNG N 0.4          
    Images: TIFF: Group 3 Fax 1D Y            
    Images: TIFF: Group 3 Fax 2D Y            
    Images: TIFF: Group 4 Fax Y            

    Explainations:

  • GIF will never be supported by Panda because of the Patents associated with the LZW compression algorithm. The only exception to this would be if it was free to decompress LZW, and the data could then be written out as something else.
  • Sunday

    Sunday was a productive day. I went to church, I had Doug look at my TV and debug the over heating problem, I mowed the lawn and got in some practise for golf in the hope of further improving my fantastic scores. I even got around to fixing the broken outdoor furniture…

    PandaLex is starting to take a little more shape. I was rusty on Bison and Flex, so having to code some without the aid of the book is a little hard on the soul, but I’m getting there now. Thinsg started to go much better when I realised that code is included in the $x numbering scheme. It does make me wonder how much pain people go through when they change some code in a terminal though — perhaps they simply put dummy code blocks everywhere so that they never have to change the numbering?

    PandaLex is going to have a series of callbacks as the hooks for the user application, which isn’t very hard to implement. Assuming I have some free time in the next week I am confident that it shouldn’t take me too much longer than a week to code it up — then again there is debugging and testing in there as well.

    Anyway, that was my first day in online diary land.

    Monday

    Heya.

    Well another day nearly over. They announced today that the reorganisation would go ahead — I am now officially an application developer!

    Had a play with the PDF parser, which I am coding on at the moment, which means it is getting ever closer. The wierd bit is that I am coding it during a Tupperware party. I’m pretty sure that means that if you have problems with the parser, then you can return it to Tupperware to have it fixed. However, please not that it is not dishwasher safe.

    Uni of Canberra is also incompetent. Well, not all of them, the Professional Management Programs people keep changing my summer course on me, so I am not sure if I will ever get it done or not. Oh well, we’ll have to wait and see.

    Oh, and I am ordered by ADSL connection today. Telstra is cool — they are giving me a free PCMCIA network card as part of the connection, which means I make about a $10 profit on the connect. Soon I’ll have a permanent Internet connection at 512kb! Welcome to nerd central.

    Why?

    Because my life is fundamentally boring, I thought I should share it with you. Failing that, everyone else has an online diary, so I didn’t want to be left out…