Page 1 of 1

Need to remove Strips from TIFF image

Posted: 2013-12-11T05:55:52-07:00
by michaelbcadena
Could someone help me remove the strips from my TIFF image. I've been unsuccessful for two days now with syntax.

"C:\Program Files (x86)\ImageMagick-6.8.7-Q16\convert.exe" +set tiff:rows-per-strip: -verbose 011848CH.tif 011848CHm.tiff

I'm able to change the strips from 3 to 1 but I need to remove strips completely
"C:\Program Files (x86)\ImageMagick-6.8.7-Q16\convert.exe" -define tiff:rows-per-strip=1 -verbose 011848CH.tif 011848CHm.tiff

Thank you for any help you can provide guys!

Mike

Re: Need to remove Strips from TIFF image

Posted: 2013-12-11T11:03:27-07:00
by snibgo
As I understand it, strips are the TIFF data structure that contains pixels. A TIFF with no strips would contain no pixels.

Re: Need to remove Strips from TIFF image

Posted: 2013-12-11T11:34:06-07:00
by michaelbcadena
My apologies if I'm incorrect with naming. You have striped tiff format from TIFF 4.0 and 5.0. I need to remove striped format due to poorly built application ingesting the TIFFs that are striped format. I would have thought the tiff:tile command would have removed the stripes but again unsuccessful. Striped tiffs can be converted to non striped, strip stripped, etc... whatever they call it. I've found so many spellings of the same meaning.

I can remove striped format using Tiffcp command line tool. But I really like ImageMagick but I'm just a beginner and need some expertise on how I can convert a striped tiff to a non-striped tiff.

Re: Need to remove Strips from TIFF image

Posted: 2013-12-11T11:41:04-07:00
by snibgo
Can you provide samples of "striped tiff" and "non-striped tiff" files? Put them somewhere like dropbox.com and paste the links here.

Re: Need to remove Strips from TIFF image

Posted: 2013-12-11T11:57:49-07:00
by michaelbcadena
I wish I could. I'm working as a consultant and the images are owned by my client. I've been uncompressing / removing stripped from TIFF files for some time now. Just would like the capability with ImageMagick.

Only ImageMagick syntax I could find was to convert the image to tile and that would remove stripe.

Re: Need to remove Strips from TIFF image

Posted: 2013-12-11T12:17:45-07:00
by snibgo
If you have a process for "removing stripes", you could create an ordinary TIFF ("with stripes"), put it through that process, and put the two files here. Then someone might find how IM can replicate that process.

Re: Need to remove Strips from TIFF image

Posted: 2013-12-11T14:27:59-07:00
by michaelbcadena
I don't have the older product that creates 4.0 and 5.0 TIFFs that would create .sStripped I just have the syntax to turn into tile TIFF 6.0 format. If I just open an old 4.0 or 5.0 stripped TIFF image in Photoshop it will automatically save the image as TIFF 6.0 replacing strip with tile format.

Re: Need to remove Strips from TIFF image

Posted: 2013-12-11T16:00:41-07:00
by fmw42
I believe you can create tiled tiffs in IM using a -define to specify the tile geometry. If you want a tiled pyramid, preface the output with PTIF:output.tiff But I have not tested any of this.

see the following:
http://www.imagemagick.org/script/formats.php#supported
http://www.imagemagick.org/script/comma ... php#define

Re: Need to remove Strips from TIFF image

Posted: 2013-12-11T16:05:55-07:00
by michaelbcadena
Great find I have tested this string and syntax with my TIFFs in IM and the images still fail. After I run the identify command I see no change in strip count or any additionally added tile tags. I was hoping to offer a better solution to client with IM but I may need to resort back to LibTIFF using Tiffcp.

Re: Need to remove Strips from TIFF image

Posted: 2013-12-11T16:21:37-07:00
by michaelbcadena
Could it be possible defect? I'm too new to product to say I feel comfortable saying its a defect.
I can modify the strip amount.
REM "C:\Program Files (x86)\ImageMagick-6.8.7-Q16\convert.exe" 011848CH.tif -define tiff:rows-per-strip=1 -verbose 011848CHm.tif

When I run the below I still have tiff:strip format in the file. I ran with identify
"C:\Program Files (x86)\ImageMagick-6.8.7-Q16\convert.exe" 011848CHm.tif -define tiff:tile-geometry=600x732 -verbose 011848CHm1.tif

Identify log:
Image: 011848CHm1.tif
Format: TIFF (Tagged Image File Format)
Mime type: image/tiff
Class: DirectClass
Geometry: 600x732+0+0
Resolution: 300x300
Print size: 2x2.44
Units: PixelsPerInch
Type: ColorSeparation
Base type: TrueColor
Endianess: MSB
Colorspace: CMYK
Depth: 8-bit
Channel depth:
cyan: 8-bit
magenta: 8-bit
yellow: 8-bit
black: 1-bit
Channel statistics:
Cyan:
min: 0 (0)
max: 255 (1)
mean: 190.631 (0.747572)
standard deviation: 86.0144 (0.337312)
kurtosis: -0.298953
skewness: -1.11705
Magenta:
min: 0 (0)
max: 255 (1)
mean: 162.173 (0.635974)
standard deviation: 92.9235 (0.364406)
kurtosis: -1.39919
skewness: -0.479926
Yellow:
min: 0 (0)
max: 255 (1)
mean: 146.571 (0.574789)
standard deviation: 100.604 (0.394524)
kurtosis: -1.63537
skewness: -0.289028
Black:
min: 0 (0)
max: 0 (0)
mean: 0 (0)
standard deviation: 0 (0)
kurtosis: 0
skewness: 0
Image statistics:
Overall:
min: 0 (0)
max: 255 (1)
mean: 124.844 (0.489584)
standard deviation: 80.8615 (0.317104)
kurtosis: 1.05617
skewness: 0.0462547
Total ink density: 300%
Rendering intent: Perceptual
Gamma: 0.454545
Chromaticity:
red primary: (0.64,0.33)
green primary: (0.3,0.6)
blue primary: (0.15,0.06)
white point: (0.3127,0.329)
Background color: cmyk(255,255,255,0)
Border color: cmyk(223,223,223,0)
Matte color: cmyk(189,189,189,0)
Transparent color: cmyk(0,0,0,0)
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 600x732+0+0
Dispose: Undefined
Iterations: 0
Compression: None
Orientation: TopLeft
Properties:
crs:AlreadyApplied: True
date:create: 2013-12-11T17:15:52-06:00
date:modify: 2013-12-11T17:15:52-06:00
dc:format: image/tiff
photoshop:ColorMode: 4
photoshop:DateCreated: 2011-08-29T14:52:54
photoshop:LegacyIPTCDigest: 460CF28926B856DAB09C01A1B0A79077
signature: 9b9bdc9a02420f8e07d363ba7241c86c1875ff978f2a9c2578e6a888f688a9a0
stRef:documentID: uuid:B3E8250D83E6E111AE1BF9FF50E62B60
stRef:instanceID: xmp.iid:7662520D0A20681191099BF9947496DF
stRef:originalDocumentID: uuid:B3E8250D83E6E111AE1BF9FF50E62B60
tiff:document: 011848CHm1.tif
tiff:endian: lsb
tiff:make: Canon
tiff:model: Canon EOS 30D
tiff:photometric: separated
tiff:rows-per-strip: 3
tiff:software: ImageMagick 6.5.8-8 2009-12-18 Q16 http://www.imagemagick.org
tiff:timestamp: 2012:09:06 15:18:09
xmp:CreateDate: 2012-08-14T21:52:27-05:00
xmp:CreatorTool: Adobe Photoshop CS2 Windows
xmp:MetadataDate: 2012-09-06T15:18:09-05:00
xmp:ModifyDate: 2012-09-06T15:18:09-05:00
xmpMM:DocumentID: uuid:B3E8250D83E6E111AE1BF9FF50E62B60
xmpMM:InstanceID: xmp.iid:7762520D0A20681191099BF9947496DF
xmpMM:OriginalDocumentID: uuid:B3E8250D83E6E111AE1BF9FF50E62B60
xmpRights:Marked: False
Profiles:
Profile-8bim: 8398 bytes
Profile-xmp: 15912 bytes
Artifacts:
filename: 011848CHm1.tif
verbose: true
Tainted: False
Filesize: 1.815MB
Number pixels: 439K
Pixels per second: 48.81MB
User time: 0.016u
Elapsed time: 0:01.008
Version: ImageMagick 6.8.7-9 Q16 x86 2013-11-28 http://www.imagemagick.org

Re: Need to remove Strips from TIFF image

Posted: 2013-12-11T17:19:29-07:00
by fmw42
IM is just not reporting the tile size. A suggestion to the developers is to add the tile size to the tiff info reported by -verbose in identify and convert.

Nevertheless it works. For example in IM 6.8.7.9 Q16 Mac OSX using the IM internal logo: image. See http://www.imagemagick.org/script/forma ... tin-images

convert logo: -define tiff:rows-per-strip=1 -define tiff:tile-geometry=128x128 logo_tile.tif

identify -verbose logo_tile.tif

date:create: 2013-12-11T16:13:55-08:00
date:modify: 2013-12-11T16:13:55-08:00
signature: 5c701306a9a985a0c93c8d11a1e761d7f8637577697fc60d7189b221388f8edf
tiff:document: logo_tile.tif
tiff:endian: lsb
tiff:photometric: palette
tiff:rows-per-strip: 1


But using the tiffinfo function

tiffinfo logo_tile.tif

TIFF Directory at offset 0x50008 (327688)
Image Width: 640 Image Length: 480
Tile Width: 128 Tile Length: 128
Bits/Sample: 8
Compression Scheme: None
Photometric Interpretation: palette color (RGB from colormap)
FillOrder: msb-to-lsb
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 1
Rows/Strip: 1
Planar Configuration: single image plane
Page Number: 0-1
Color Map: (present)
DocumentName: logo_tile.tif
White Point: 0.3127-0.329
PrimaryChromaticities: 0.640000,0.330000,0.300000,0.600000,0.150000,0.060000