Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
tifftopnm in package media-libs/netpbm-10.11.5-r2 broken?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
philphys
n00b
n00b


Joined: 09 Apr 2003
Posts: 3
Location: In front of my computer, usually.

PostPosted: Wed Apr 09, 2003 7:38 am    Post subject: tifftopnm in package media-libs/netpbm-10.11.5-r2 broken? Reply with quote

I've just found out that 'tifftopnm' from netpbm-10.11.5-r2 package produces broken pnm output with 16-bit monochrome tiff image. But tifftopnm from package netpbm-9.12-r4 gives normal output as does the one from netpbm-9.24 in Redhat 8.0.

Code:

$ od -tx1 netpbm-9.12_out |head
0000000 50 35 0a 35 31 32 20 35 31 32 0a 36 35 35 33 35
0000020 0a 20 14 d0 13 40 13 00 12 b0 12 50 14 30 14 c0
0000040 12 a0 13 40 13 b0 14 a0 14 10 16 b0 17 20 14 e0
0000060 13 80 14 a0 14 50 14 70 13 b0 15 c0 19 40 1a 60
0000100 15 90 16 10 18 a0 19 a0 1c 20 17 10 19 50 17 d0
0000120 16 50 19 a0 19 50 16 20 1b 20 20 20 1d f0 1a 40
0000140 1a 80 1d 10 18 00 19 30 1b 20 1e 20 1b e0 1a 40
0000160 21 00 1f 00 21 90 1c 40 1c 90 1d 60 2a 20 22 80
0000200 20 b0 20 70 1f f0 25 d0 27 70 32 90 2d b0 2c 00
0000220 41 80 37 90 34 30 29 30 32 c0 4f 60 85 d0 61 b0

$ od -tx1 netpbm-10.11.5_out |head
0000000 50 35 0a 35 31 32 20 35 31 32 0a 36 35 35 33 35
0000020 0a 14 14 13 13 13 13 12 12 12 12 14 14 14 14 12
0000040 12 13 13 13 13 14 14 14 14 16 16 17 17 14 14 13
0000060 13 14 14 14 14 14 14 13 13 15 15 19 19 1a 1a 15
0000100 15 16 16 18 18 19 19 1c 1c 17 17 19 19 17 17 16
0000120 16 19 19 19 19 16 16 1b 1b 20 20 1d 1d 1a 1a 1a
0000140 1a 1d 1d 18 18 19 19 1b 1b 1e 1e 1b 1b 1a 1a 21
0000160 21 1f 1f 21 21 1c 1c 1c 1c 1d 1d 2a 2a 22 22 20
0000200 20 20 20 1f 1f 25 25 27 27 32 32 2d 2d 2c 2c 41
0000220 41 37 37 34 34 29 29 32 32 4f 4f 85 85 61 61 77

The image is 512x512 12-bit monochrome so the header is 17 bytes long. ("P5\n512 512\n65535\n")
Instead of properly producing 4 LSB padded with 4 0's followed by 8 MSB (as the original image does), you can see 10.11.5 produces 2 identical 8 MSB pairs.
I have tried '-respectfillorder' option to no avail and '-byrow' option does not work.

Anybody have any idea what is going on here?

By the way, 'tifftopnm --headerdump' gives :
Code:

(9.12-r4)
TIFF Directory at offset 0x8
  Subfile Type: (0 = 0x0)
  Image Width: 512 Image Length: 512
  Bits/Sample: 16
  Compression Scheme: None
  Photometric Interpretation: min-is-black
  Date & Time: "2003:03:28 00:50:46"
  Samples/Pixel: 1
  Rows/Strip: 8
  Planar Configuration: single image plane
tifftopnm: 512x512x16 image
tifftopnm: 16 bits/sample, 1 samples/pixel
tifftopnm: 1 graylevels (min=black)

(10.11.5-r2)
TIFF Directory at offset 0x8
  Subfile Type: (0 = 0x0)
  Image Width: 512 Image Length: 512
  Bits/Sample: 16
  Compression Scheme: None
  Photometric Interpretation: min-is-black
  Date & Time: "2003:03:28 00:50:46"
  Samples/Pixel: 1
  Rows/Strip: 8
  Planar Configuration: single image plane
tifftopnm: 512x512x16 image
tifftopnm: 16 bits/sample, 1 samples/pixel
tifftopnm: 65536 graylevels (min=black)
tifftopnm: writing PGM file

_________________
Sometimes the best medicine is to stop taking something.

Everything should be as simple as possible, not simpler.
- Albert Einstein
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum