jpeglib for Palm OS
jpeglib is a shared library for Palm OS handheld computers. It permits other
applications to support easily JPEG encoding and decoding. JPEG is a standard
compression method for photographic images. It's lossy, which means
that the decoded image is very close to, but not exactly the same as the original
image; this permits much larger compression ratios. The trade-off between quality
and compression ratio can be chosen. JPEG is often used by digital
cameras, such as the built-in camera of the Zire 71.
For the user of the application, jpeglib is just a PRC file which is installed
on the Palm OS handheld like any other application file. It weights slightly less
than 64 KB, and is shared by all the applications which rely on it. For the
C or C++ developer, jpeglib comes with a single .h include file. Port to other languages
should be straighforward.
Technical description
jpeglib is based on the work of the Independent JPEG Group. To fit their comprehensive
library into the severe constraints of Palm OS (especially the code size and the
processing power), only the fast integer implementation of the Discrete Cosine Tranform
is included; note that this doesn't limit at all the kind of JPEG files which can be
decoded. Support for JPEG data in memory, in file streams (a way to store data
in Palm OS databases with an API similar to file systems) and in VFS (the virtual
file system used by Palm OS for memory expansion modules) has been added to make the
use of the library as easy as possible for Palm OS developers.
Download
Download it now! Last update: 12 September 2003.
The ZIP archive weights 50 KBytes.
It contains the PRC file, the include file you can use to develop your applications, sample
code, and the source file we wrote. To rebuild the library yourself, you will also need the source
code of the Independant JPEG Group's
library, version 6b.
License
The license below is known as the modified BSD license, with an additional reference to
the Independent JPEG Group to comply with its terms. It applies to the source
code written specifically for the Palm, not to the work of the Independent JPEG Group
(see the remark below).
Copyright (c) 2003, Yves Piguet.
All rights reserved.
Based on the work of the Independent JPEG Group.
Redistribution and use in source and binary forms, with or without modification, are
permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of
conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of
conditions and the following disclaimer in the documentation and/or other materials
provided with the distribution.
- Neither the name of Yves Piguet nor the names of its contributors may
be used to endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
Remarks
Sorry for shouting; we keep the modified BSD license disclaimer verbatim.
For a discussion on different open-source and "free" ("copyleft") licenses, please
visit http://www.opensource.org
and http://www.gnu.org.
To build a working JPEG library, you should link the source code specific to
the Palm with the JPEG library of the Independent JPEG Group. We used version 6b.
Our source code contains all the details.
If you modify this library, please don't distribute incompatible
versions under the same name! This would cause a lot of troubles for
users who install applications with different versions of JpegLibPalm.
Either rename the library, or if you think your modifications are
useful, send them to me so that they can be included in a
new version.
If you bundle JpegLib for Palm with your product, a book, a magazine, etc.,
you might consider sending me a copy. Thank you!
Release notes
12 September 2003
- BmpGetDimensions replaced with BmpGlueGetDimensions to support
pre-Palm OS 4 devices
28 August 2003
- Opensourced
- The end of VFS files wasn't read when the file size wasn't a multiple
of 4096 bytes; fixed
14 July 2003
|