Tiff problem

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
drewvy

Tiff problem

Post 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
drewvy

Re: Tiff problem

Post 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
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Tiff problem

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
drewvy

Re: Tiff problem

Post 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
drewvy

Re: Tiff problem

Post 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
drewvy

Re: Tiff problem

Post by drewvy »

Does anyone have any ideas why a pure black image would contain garbage in the green subpixels?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Tiff problem

Post 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)
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply