diff options
| author | Mike Wey | 2011-02-20 20:41:35 +0100 |
|---|---|---|
| committer | Mike Wey | 2011-02-20 20:41:35 +0100 |
| commit | efd789405e397e0d3d3a3055b80b3350be7444e1 (patch) | |
| tree | b5dc0bedbd8ee9c2d1e5c965f6696dd5728ee45e /dmagick/c | |
| parent | ff26b979509498cc5ebd2ab003b6f3e530fdc4c9 (diff) | |
Add ColorRGB
Diffstat (limited to 'dmagick/c')
| -rw-r--r-- | dmagick/c/quantum.d | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/dmagick/c/quantum.d b/dmagick/c/quantum.d index bd774af..4186c11 100644 --- a/dmagick/c/quantum.d +++ b/dmagick/c/quantum.d @@ -78,6 +78,13 @@ extern(C) return(cast(ubyte) (((quantum+128UL)-((quantum+128UL) >> 8)) >> 8)); } + static pure nothrow Quantum ScaleCharToQuantum(ubyte value) + { + enum Quantum factor = QuantumRange/255; + + return cast(Quantum)(factor*value); + } + MagickBooleanType SetQuantumDepth(const(Image)*, QuantumInfo*, const size_t); MagickBooleanType SetQuantumFormat(const(Image)*, QuantumInfo*, const QuantumFormatType); MagickBooleanType SetQuantumPad(const(Image)*, QuantumInfo*, const size_t); |
