Page 1 of 1

Tiff problem

Posted: 2008-07-01T10:21:13-07:00
by drewvy
I'm using ImageMagick 6.4.1 on Windows and Linux and both have the same problem.

When I do something simple like:

convert gb_test_r.tiff test.tiff

The output file is not readable by some programs. In this case I can load gb_test_r.tiff with Windows Picture and Fax Viewer but I can't load test.tiff.

One thing I notice is that test.tiff is a lot smaller (4 megs) than gb_test_r.tiff (12 megs). Why is that? Is there a way to stop it from reducing the size? Is there any control on how the tiff is saved?

You can find the files I used here: http://drop.io/imagemagick

Thanks for your help,
Drew

Re: Tiff problem

Posted: 2008-07-01T10:51:18-07:00
by drewvy
I just did another test that fixed the problem.

The image I was processing was B&W. I added a three dots of color: R, G, and B and now it converts without problems.

Is this a bug? Is there a way around this issue?

~Drew

Re: Tiff problem

Posted: 2008-07-01T16:34:27-07:00
by anthony
Without a more info it is difficult to know what is going on. But if it is working good.

Size difference is probably due to GD no compressing, while IM does do compression. There are various setting syou can use to control this.

Re: Tiff problem

Posted: 2008-07-07T13:19:15-07:00
by drewvy
anthony wrote:Without a more info it is difficult to know what is going on. But if it is working good.

Size difference is probably due to GD no compressing, while IM does do compression. There are various setting syou can use to control this.
I put up the images I'm talking about. test.tiff is a lot smaller (4 megs) than gb_test_r.tiff (12 megs). It seems that it is taking a 16 bit per color image and turning it into a single channel 16 bit black and white image. Is there a way to stop it from doing that? Is there any control on how the tiff is saved? All I'm doing is: "convert gb_test_r.tiff test.tiff"

You can find the files I used here: http://drop.io/imagemagick

Re: Tiff problem

Posted: 2008-07-07T15:06:05-07:00
by drewvy
I just found another weird problem. If I load in a pure black tif, when I go to read the RGB values, I see weird numbers in green.

I load the image and then I call clone to make a copy and then I get the pixels so i can alter them

my_image1 = CloneImage(image,image->columns,image->rows,MagickTrue,exception);

PixelPacket *pixels1;
pixels1=GetImagePixels(my_image1,0,loop,ghostbusted_image1->columns,1); //You can modify these pixels

Then then loop throught the pixels and I get bad values back
PixelPacket worker1 = *(pixels2+loop2);

worker1.green == odd values. As I interate the pixels, green == 106 and it gets smaller as I go through the pixels.

Any ideas? I was hoping to send my program to testing this week :^(

I put the black.tif file I use here http://drop.io/imagemagick

Re: Tiff problem

Posted: 2008-07-08T12:24:11-07:00
by drewvy
Does anyone have any ideas why a pure black image would contain garbage in the green subpixels?

Re: Tiff problem

Posted: 2008-07-08T22:40:27-07:00
by anthony
drewvy wrote:Does anyone have any ideas why a pure black image would contain garbage in the green subpixels?
Generally because the source was either JPEG (lossy) compressed or a digital camera (CCD is error prone)