AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
November 1998

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



1998.11.04 16:39 "Re: Conversion to YCbCr...", by Arthur Davis

Eric,

You might take a look at the Independent JPEG Group's free JPEG
implementation.  Start at their web page at http://www.ijg.org/ which
contains a link to an ftp site where you can download the actual code.  I
haven't spent much time with their library, but I understand that to
compress an image, you set up the compression 'object' by telling it some
details about the image data that you have (color space, size, etc.) and
then feed the image to it one scan line at a time.  Of course, this requires
you to understand the source file format enough to be able to get at the
image data.  If that's a problem, I think that the package also contains a
conversion utility that will take an image file (supported formats: PPM,
PGM, BMP, Targa, and RLE) and produce a JPEG file and vice versa.

If you want to incorporate a JPEG bitstream into a TIFF file, then that's a
different story.  I have read that the JPEG library has also been used to do
that, and I don't see why it you wouldn't be able to, but someone else would
have to comment on that.

The only other comment I have is about color space conversions.  Converting
from RGB to YCbCr is not difficult:
    Y  = (0.299 * R) + (0.587 * G) + (0.114 * B)
    Cb = (0.5 * B)   - (0.169 * R) - (0.331 * G) + 128
    Cr = (0.5 * R)   - (0.419 * G) - (0.081 * B) + 128
        (This comes from the CCIR Recommendation 601-2)
This will give what is known as YCC444.  Then you can downsample from there.

Hope this helps.

Arthur Davis
FlashPoint Technology, Inc.

-----Original Message-----
From: Eric Ashley <eric@covesys.com>
To: tiff@sgi.com <tiff@sgi.com>
Date: Tuesday, November 03, 1998 4:39 PM
Subject: Conversion to YCbCr...


>Anyone got an example of downsampling from either TIFF or Windows DIB RGB
to
>YCbCr?  I want to switch to JPEG compression (7) for my grayscale and color
>images and it seems like YCbCr downsampling the best first step in doing
so.
>
>Also, has anyone produced a reference of the required tags for JPEG-in-TIFF
>based on TechNote 2?
>
>Thanks,
>
>Eric Ashley
>Chief Technologist
>Cove Systems, Inc.
>eric@covesys.com
>+1-941-283-9170 voice / +1-941-283-9175 fax
>http://www.covesys.com/
>