fup2 comp.graphics.misc
Ian:
>I'm looking at doing some server-side processing with jpeglib. I
>understand that jpeglib can do some format conversions but can it read
>in an input file other than Jpeg? (eg. Start with a gif and render to
>jpeg?)
According to djpeg's man page, it can only read JPEG, but write
several output formats.
Use ImageMagick's convert or one of the NetPBM utilities if you need
to read other formats.
>Some tests that I've done w/ the pkg sample djpeg converts from jpg to
>gif * bmp but there was substantial colour loss. Any thoughts on how
>to preserve colours would also be appreciated.
JPEG color images usually have 24 bits per pixel, GIF can only store 8
bits. Therefore, a GIF file may not be able to store all of the
information contained in the JPEG file. These two formats exist for
different types of images. Use JPEG with photos, GIF (or better: PNG)
with graphics. There is rarely an image which can be stored equally
well with JPEG and GIF.
If you get a loss converting JPEG to BMP, I don't understand that. BMP
does sup****t 24 bpp.
Regards,
Marco


|