magickwand imagedepth 8bit problem

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
mmickey

magickwand imagedepth 8bit problem

Post by mmickey »

Hi folks,
for saving 8bit tiff or ppm I tried to use

Code: Select all

MagickSetDepth(mw,8)
but on windows and linux 16bit tiffs or ppms are saved.
Any ideas?

greets mike
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: magickwand imagedepth 8bit problem

Post by el_supremo »

Try MagickSetImageDepth(mw,8)

Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
mmickey

Re: magickwand imagedepth 8bit problem

Post by mmickey »

Thank you very much, it works.

Why are there two versions aiming at the same setting?

greets mike
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: magickwand imagedepth 8bit problem

Post by magick »

Method settings that do not include Image in the name set attributes before an image is instantiated. If the method name includes Image, it sets the attributes after it is instantiated. MagickSetDepth() is useful, for example, to read an 16-bit raw RGB image from a file on disk. You could then use MagickSetImageDepth() after the raw image is read and you want to convert it to a depth of 8-bits.
mmickey

Re: magickwand imagedepth 8bit problem

Post by mmickey »

Thank you for your explanation.

greets mike
Post Reply