Hi,

I'm using ImageMagick 5.4.2 on RedHat Linux.

I need to convert a LZW compressed GIF to an
uncompressed JPEG.
I have a GIF image with the following properties:

C:\_media>identify -verbose warning.gif
Image: warning.gif
  Format: GIF (CompuServe graphics interchange format)
  Class: PseudoClass
  Geometry: 150x55
  Type: Bilevel
  Endianess: Undefined
  Colorspace: Gray
  Channel depth:
    Gray: 1-bit
  Channel statistics:
    Gray:
      Min: 0 (0)
      Max: 1 (1)
      Mean: 0.455879 (0.455879)
      Standard deviation: 0.49805 (0.49805)
  Colors: 2
  Histogram:
      4489: #000000 black
      3761: #FFFFFF white
  Colormap: 2
         0: #000000 black
         1: #FFFFFF white
  Rendering intent: Undefined
  Resolution: 72x72
 Units: Undefined
 Filesize: 432b
 Interlace: None
 Background color: white
 Border color: rgb(223,223,223)
 Matte color: grey74
 Transparent color: black
 Page geometry: 150x55+0+0
 Dispose: Undefined
 Compression: LZW
 Orientation: Undefined
 Signature:
4e8727d16838abde6dbba4f6d31c894cd11985455f8468ce5380ab9b0c734fb8
 Tainted: True
 User time: 0.000u
 Elapsed time: 0:01
 Pixels per second: 113.475kb


Here are the sequence of calls I'm using;

    image_info = CloneImageInfo(
                NULL);

    SetImageInfo(
                image_info,
                False,
                &exception);

    image = BlobToImage(
                image_info,
                blob,
                length,
                &exception);
//blob has the original image buffer
....
        clone_info = CloneImageInfo(
                image_info);

        /* make sure the output type has a delegate (we can
convert it) */
        GetExceptionInfo(
                exception);

        magick_info = GetMagickInfo(
                clone_info->magick,
                exception);
                DetachBlob(
                        clone_info->blob);

                clone_info->blob->extent = length;      
clone_info->blob->data=
AcquireMemory(clone_info->blob->extent + 1);

WriteJPEGImage */
        status = magick_info->encoder(
                clone_info,
                image);




 
____________________________________________________________________________________
Sponsored Link

Compare mortgage rates for today. 
Get up to 5 free quotes. 
Www2.nextag.com
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to