can quantum depth be made to be dynamically specified?

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
kyngchaos

can quantum depth be made to be dynamically specified?

Post by kyngchaos » 2006-05-05T19:12:42-07:00

I understand that one must build IM with one or the other (8 or 16). Is it possible to make this configurable at runtime? (Why was is made this way in the first place?)

My problem is that I build IM and distribute a binary, for OS X, (I know IM distributes it's own binaries, but there is the same problem), and so must build twice and distribute two binaries. This has become even worse - to build Universal binaries for OS X, that's 4 builds. (or 6 if I made a 32-bit version!)

I guess it must be some internal memory/code optimization thing? Is it possible?

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

Post by magick » 2006-05-05T19:18:14-07:00

Changing the quantum depth is specified at build time. However, you can set the image depth dynamically. For example, if you run the Q16 version of ImageMagick you can specify -depth 8 to generate a 8-bit PNG ot TIFF image.

kyngchaos

Post by kyngchaos » 2006-05-05T19:34:29-07:00

I know that. I'm asking about changing that build-time behavior. It's not a question of processing 8 or 16 bit images, it's the memory and scratch disk usage.

If I mostly process large 8-bit images, but need to occassionally process 16 bit images, I need to use the 16 bit build, but then I'll be wasting time with the extra memory and scratch disk needed for those large 8 bit images. It's even said in the docs somewhere - using the 8bit build will be faster.

Post Reply