From 45410e265b897f36b60119f6058de5b40fd6a43a Mon Sep 17 00:00:00 2001 From: cristy Date: Wed, 9 Jun 2010 02:43:31 +0000 Subject: [PATCH] --- magick/quantum.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magick/quantum.h b/magick/quantum.h index 915833150..e2b8c6aef 100644 --- a/magick/quantum.h +++ b/magick/quantum.h @@ -111,7 +111,7 @@ static inline unsigned char ScaleQuantumToChar(const Quantum quantum) static inline unsigned char ScaleQuantumToChar(const Quantum quantum) { #if !defined(MAGICKCORE_HDRI_SUPPORT) - return((unsigned char) (quantum/257U)); + return((unsigned char) (((quantum+128UL)-((quantum+128UL) >> 8)) >> 8)); #else if (quantum <= 0.0) return(0); -- 2.40.0