JPEG 2000 for Pascal

v 1.00 (7th July 2009)

Homepage

JPEG 2000 for Pascal is library for Object Pascal (Delphi and Free Pascal) developers that want to use JPEG 2000 images in their applications. It is based on OpenJpeg library written in C language (BSD license). C library is precompiled (using C++ Builder for Delphi and GCC for FPC) for several platforms and Pascal header is provided. Some higher level classes for easier manipulation with JPEG 2000 images are part of the JPEG 2000 for Pascal as well.

Library Contents

Installation

Delphi: Just add some of JPEG 2000 for Pascal units you wan to use to your uses clause (must be in you search path) and precompiled library will be linked automatically.

Free Pascal: OpenJpeg is compiled into static libraries so you have to set library search path when compiling your project. Libraries are located in J2KObjects directory.

Future Plans

Notes and Tips

If you want to recompile OpenJpeg yourself (custom modification, other compiler settings, etc.) note that Pascal header is based on SVN revision 507 with my CDEF patch applied (needed to store alpha channels correctly and for better compatibility of saved files with other software). You can get the patch and some more info here: OpenJpeg group on Google.

In this thread there's also a mention about channel values being saved as 128. When library is compiled with GCC (depends on optimization settings) fourth and subsequent image channel is saved wrongly and all pixels have the value of 128 for this channel. So when recompiling make sure you test if this problem appears.