Can't flatten tif files???
-
- Posts: 5
- Joined: 2013-11-21T10:49:42-07:00
- Authentication code: 6789
Can't flatten tif files???
Hi,
I'm trying to do something very simple with IM. But no matter what command I try I can't seem to hack it. I'm very simply trying to flatten a layered tif/tiff file. This file is created in PS. I can't post this particular file because it's a celeb and I'd get in trouble, but suffice to say its just a layered tiff and I want to flatten it.
I've tried:
convert -flatten -background white in.tif out.tif
convert -flatten in.tif out.tif
convert in.tif -layers out.tif
convert in.tif -alpha off -layers flatten out_file.tif
convert in.tif -flatten
convert in.tif -flatten out.tif
I get these errors (which I've read doesn't mean anything and can be ignored...)
convert: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/837.
convert: Unknown field with tag 306 (0x132) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/837.
convert: Incompatible type for "FileSource"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/837.
convert: Incompatible type for "SceneType"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/837.
convert: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/837.
I've read all the related threads, tried the above commands, no luck. Any help here would be helpful.
Thanks,
Kevin
I'm trying to do something very simple with IM. But no matter what command I try I can't seem to hack it. I'm very simply trying to flatten a layered tif/tiff file. This file is created in PS. I can't post this particular file because it's a celeb and I'd get in trouble, but suffice to say its just a layered tiff and I want to flatten it.
I've tried:
convert -flatten -background white in.tif out.tif
convert -flatten in.tif out.tif
convert in.tif -layers out.tif
convert in.tif -alpha off -layers flatten out_file.tif
convert in.tif -flatten
convert in.tif -flatten out.tif
I get these errors (which I've read doesn't mean anything and can be ignored...)
convert: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/837.
convert: Unknown field with tag 306 (0x132) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/837.
convert: Incompatible type for "FileSource"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/837.
convert: Incompatible type for "SceneType"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/837.
convert: Incompatible type for "RichTIFFIPTC"; tag ignored. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/837.
I've read all the related threads, tried the above commands, no luck. Any help here would be helpful.
Thanks,
Kevin
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Can't flatten tif files???
Code: Select all
convert in.tif -flatten out.tif
What version of IM on what platform?
snibgo's IM pages: im.snibgo.com
Re: Can't flatten tif files???
If you created the tiff file or somebody in your organisation created it why not create another one that is not sensitive and post a link to that?I can't post this particular file because it's a celeb and I'd get in trouble
-
- Posts: 5
- Joined: 2013-11-21T10:49:42-07:00
- Authentication code: 6789
Re: Can't flatten tif files???
I've pasted over the sensitive stuff in this image. I did try with a different image and did get things to work. So my guess if the iptc errors are preventing IM from doing it's thing. But how to get around this?
Here's the file in question: https://www.hightail.com/download/OGhkZ ... WGNPd3NUQw
Version: ImageMagick 6.6.9-7
TIFF* TIFF rw+ Tagged Image File Format (LIBTIFF, Version 3.9.5)
TIFF64* TIFF --- Tagged Image File Format (64-bit) (LIBTIFF, Version 3.9.5)
And a few other questions, I was planning to just run this command on all tif files we receive (some layered, most not) but in the interest of saving processing time, is there a way to check for layers with IM, and if true then run the flatten command??
Lastly can I overwrite the input file with the flat version, eg no output file??
Thanks!
Kevin
Here's the file in question: https://www.hightail.com/download/OGhkZ ... WGNPd3NUQw
Version: ImageMagick 6.6.9-7
TIFF* TIFF rw+ Tagged Image File Format (LIBTIFF, Version 3.9.5)
TIFF64* TIFF --- Tagged Image File Format (64-bit) (LIBTIFF, Version 3.9.5)
And a few other questions, I was planning to just run this command on all tif files we receive (some layered, most not) but in the interest of saving processing time, is there a way to check for layers with IM, and if true then run the flatten command??
Lastly can I overwrite the input file with the flat version, eg no output file??
Thanks!
Kevin
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Can't flatten tif files???
This seems to work fine for me on IM 6.8.7.6 Q16 Mac OSX and LIBTIFF, Version 4.0.3
convert Shot_03_Single_034.tif -background black -flatten Shot_03_Single_034.png
It is either your version of IM or libtiff or both that may be too old. Can you upgrade
check your version of libtiff
tiffinfo
LIBTIFF, Version 4.0.3
...
convert Shot_03_Single_034.tif -background black -flatten Shot_03_Single_034.png
It is either your version of IM or libtiff or both that may be too old. Can you upgrade
check your version of libtiff
tiffinfo
LIBTIFF, Version 4.0.3
...
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Can't flatten tif files???
That file contains only one image, with no transparency. What do you expect flatten to do? What do you want it to do?Here's the file in question: https://www.hightail.com/download/OGhkZ ... WGNPd3NUQw
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Can't flatten tif files???
The tiff file opened in PS shows several layers. I suspect IM is flattening them already, since it probably does not know about grouped layers. In any case, my result from IM, which as snibgo says sees only one layer in the original when opened, looks exactly like what you see in PS with all layers on (or if you were to flatten or merge them all).
-
- Posts: 5
- Joined: 2013-11-21T10:49:42-07:00
- Authentication code: 6789
Re: Can't flatten tif files???
So I gave you my server IM version, I forgot I was in a ssh session when I checked...
But my testing has all been local on my Mac 10.8.5 with:
TIFF* TIFF rw+ Tagged Image File Format (LIBTIFF, Version 4.0.3)
TIFF64* TIFF rw- Tagged Image File Format (64-bit) (LIBTIFF, Version 4
ImageMagick 6.8.7-0 2013-11-11 Q16 http://www.imagemagick.org
I tried upgrading using Home Brew, and it seems to think this is the latest... Obviously it's not.
And yes I can convert to a png or jpg and it flattens as expected, but I didn't want to have to worry about the name changing in my logic so I prefer to just keep it a tiff... I would gues converting to jpg or png wouldn't even require the flatten option sense they can't handle layers....
But that's not what I'm trying to do, I just want to flatten a layered PS tiff... surprised this doesn't work tbh.
But at least I know it's not just my newbism to IM...
Thanks everyone for taing the time to help!
But my testing has all been local on my Mac 10.8.5 with:
TIFF* TIFF rw+ Tagged Image File Format (LIBTIFF, Version 4.0.3)
TIFF64* TIFF rw- Tagged Image File Format (64-bit) (LIBTIFF, Version 4
ImageMagick 6.8.7-0 2013-11-11 Q16 http://www.imagemagick.org
I tried upgrading using Home Brew, and it seems to think this is the latest... Obviously it's not.
And yes I can convert to a png or jpg and it flattens as expected, but I didn't want to have to worry about the name changing in my logic so I prefer to just keep it a tiff... I would gues converting to jpg or png wouldn't even require the flatten option sense they can't handle layers....
But that's not what I'm trying to do, I just want to flatten a layered PS tiff... surprised this doesn't work tbh.
But at least I know it's not just my newbism to IM...
Thanks everyone for taing the time to help!
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Can't flatten tif files???
It seems there are different ways that Photoshop can save layers in tiff files. Sometimes they are saved as separate images, and IM can then see each one. But sometimes ("grouped layers"?) Photoshop saves the layers in such a way that IM, exiftool and Gimp can see only one layer.
snibgo's IM pages: im.snibgo.com
-
- Posts: 5
- Joined: 2013-11-21T10:49:42-07:00
- Authentication code: 6789
Re: Can't flatten tif files???
Another update:
I tried:
But when I open the out.tif in PS I see all layers alive and kicking.
Looks like I'll have to live with the name change and go png...
I tried:
Code: Select all
convert Shot_03_Single_034.tif -flatten out.tif
Looks like I'll have to live with the name change and go png...
-
- Posts: 5
- Joined: 2013-11-21T10:49:42-07:00
- Authentication code: 6789
Re: Can't flatten tif files???
#snibgo thanks for your insight.
I guess I'm surprised it doesn't just throw anything it can't see away... It must be doing that on some level when going to png...
I'll stick with the png solution I guess. Thanks everyone!
Hope this helps someone in the future as I googled my heart out trying to figure this one out...
I guess I'm surprised it doesn't just throw anything it can't see away... It must be doing that on some level when going to png...
I'll stick with the png solution I guess. Thanks everyone!
Hope this helps someone in the future as I googled my heart out trying to figure this one out...