Skip to content

How to convert/set bit depth from 1 to 8 bit #2777

Answered by jcupitt
ademmler asked this question in Q&A
Discussion options

You must be logged in to vote

Just set bitdepth, eg.:

$ vips copy mono.png x.tif[bitdepth=1]
$ tiffinfo x.tif
TIFF Directory at offset 0x372744 (5b008)
  Image Width: 1450 Image Length: 2048
  Resolution: 28.35, 28.35 pixels/cm
  Bits/Sample: 1
  Sample Format: unsigned integer
  Compression Scheme: None
  Photometric Interpretation: min-is-black
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 128
  Planar Configuration: single image plane
$ 

Same for PNG and GIF.

Replies: 3 comments 27 replies

Comment options

You must be logged in to vote
22 replies
@ademmler
Comment options

@jcupitt
Comment options

@ademmler
Comment options

@jcupitt
Comment options

@ademmler
Comment options

Answer selected by ademmler
Comment options

You must be logged in to vote
2 replies
@jcupitt
Comment options

@jcupitt
Comment options

Comment options

You must be logged in to vote
3 replies
@jcupitt
Comment options

@jcupitt
Comment options

@jcupitt
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants