0

Question:
I have two tiff files extracted from a multipage tiff image using Laser Net application. But, all images seem to be writing as multi tiffs even if it's only one image per file. Please check following tiff header from a tiff file. How would I convert these files to "truely" single page using some external DOS command or API?

SubFileType (1 Long): Zero
ImageWidth (1 Short): 2550
ImageLength (1 Short): 3300
BitsPerSample (1 Short): 1
Compression (1 Short): Group 4 Fax (aka CCITT FAX4)
Photometric (1 Short): MinIsWhite
DocumentName (74 ASCII): D:\Lasernet\Output\RDSE_002005_16_24_16_879_S...
StripOffsets (87 Long): 8, 59, 242, 5299, 25124, 45177, 65148,...
Orientation (1 Short): TopLeft
SamplesPerPixel (1 Short): 1
RowsPerStrip (1 Short): 38
StripByteCounts (87 Long): 51, 183, 5057, 19825, 20053, 19971, 21249,...
XResolution (1 Rational): 300
YResolution (1 Rational): 300
PlanarConfig (1 Short): Contig
ResolutionUnit (1 Short): Inch
PageNumber (2 Short): 0, 2
Software (25 ASCII): Neevia PDF/IMG eng. 9.01
DateTime (20 ASCII): 2013:09:27 16:25:09


TIFF Tag: PageNumber:
The page number of the page from which this image was scanned. This field is used to specify page numbers of a multiple page (e.g. facsimile) document. PageNumber[0] is the page number; PageNumber[1] is the total number of pages in the document. If PageNumber[1] is 0, the total number of pages in the document is not available.

Pages need not appear in numerical order. The first page is numbered 0 (zero). We've seen reports of some broken applications reversing the PageNumber[0] and PageNumber[1] values.

http://www.awaresystems.be/imaging/tiff/tifftags/pagenumber.html

mrd
  • 2,095
  • 6
  • 23
  • 48
  • What is the problem with the files ? Are there any problems opening them in an application? – Yahia Nov 22 '13 at 09:56
  • @yahia: No problem with opening files. I can open, but I am using these images in another application which expects "truely" single page tiff. – mrd Nov 22 '13 at 09:58
  • please show some source code, what have you tried ? – Yahia Nov 22 '13 at 10:20
  • I am not doing it with source code. I am using LaserNet application (have to use) for Tiff handling. What I have are tiff files. – mrd Nov 22 '13 at 10:47
  • then this is the wrong place to ask - SO is for programming... try at superuser... – Yahia Nov 22 '13 at 11:02

1 Answers1

0

Try graphicsmagick, gm convert badFile.tiff[0] goodFile.tiff

MC ND
  • 69,615
  • 8
  • 84
  • 126