diff options
Diffstat (limited to 'dmagick/c/quantum.d')
| -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); |
