Page 1 of 1

bmp->tiff G3 image inverted

Posted: 2008-08-11T10:54:48-07:00
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.

Re: bmp->tiff G3 image inverted

Posted: 2008-08-11T12:28:04-07:00
by el_supremo
Works for me with IM 6.4.2-5 Q8.

Pete

Re: bmp->tiff G3 image inverted

Posted: 2008-08-12T16:40:17-07:00
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();

Re: bmp->tiff G3 image inverted

Posted: 2008-08-12T19:55:51-07:00
by el_supremo
Can you post it on a website so I can download it from there?

Pete

Re: bmp->tiff G3 image inverted

Posted: 2008-08-12T22:09:31-07:00
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?