bmp->tiff G3 image inverted

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
Kurt

bmp->tiff G3 image inverted

Post by Kurt »

This code inverts the image

  • Code: Select all

    MagickBooleanType status;
    
    	MagickWand *magick_wand;
    	MagickWandGenesis();
    	magick_wand=NewMagickWand();  
    	status=MagickReadImage(magick_wand, "c:\\test.bmp");
    	MagickSetImageCompression( magick_wand, FaxCompression );
    	status=MagickWriteImages(magick_wand, "c:\\out.tiff",MagickTrue);
    	magick_wand=DestroyMagickWand(magick_wand);
    	MagickWandTerminus();
Do i need to invert the bits before the conversion? This seems wrong.
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: bmp->tiff G3 image inverted

Post by el_supremo »

Works for me with IM 6.4.2-5 Q8.

Pete
Kurt

Re: bmp->tiff G3 image inverted

Post by Kurt »

I can send you the bmp I am using. My email address is smith_kurtathotmail.com( had to take out the @ sign for it to appear correctly...you get the idea.) so if you send me an email i can send you the file. I am using the same version you are.

also, when I read two images and write them back as a multi-tiff only the first image is in G3 format.

Code: Select all

        status=MagickReadImage(magick_wand, "c:\\page1.bmp");
	status=MagickReadImage(magick_wand, "c:\\page2.bmp");

	MagickSetCompression( magick_wand, FaxCompression ); 
	
	status=MagickWriteImages(magick_wand, "c:\\out.tiff",MagickTrue);
		//if (status == MagickFalse)
		//	ThrowWandException(magick_wand);
	magick_wand=DestroyMagickWand(magick_wand);
	MagickWandTerminus();
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: bmp->tiff G3 image inverted

Post by el_supremo »

Can you post it on a website so I can download it from there?

Pete
Kurt

Re: bmp->tiff G3 image inverted

Post by Kurt »

I really don't have that option.

Any idea why all the images in the resultant tiff are not G3 encoded? This seems to be a bug.

Also, I just tried with 9 bmp images and the resultant TIFF was the same. The first image was G3 encoded. The rest were non-compressed. And even more peculiar was the 9th image added was the second in the sequence in the output tiff. Why would the images be out of order when written?
Post Reply