ext/RMagick/rmutil.c in rmagick-1.15.1 vs ext/RMagick/rmutil.c in rmagick-1.15.2

- old
+ new

@@ -1,6 +1,6 @@ -/* $Id: rmutil.c,v 1.90 2007/01/15 23:32:31 rmagick Exp $ */ +/* $Id: rmutil.c,v 1.90.2.1 2007/02/04 13:16:23 rmagick Exp $ */ /*============================================================================\ | Copyright (C) 2007 by Timothy P. Hunter | Name: rmutil.c | Author: Tim Hunter | Purpose: Utility functions for RMagick @@ -752,13 +752,13 @@ Pixel *pixel; Quantum intensity; Data_Get_Struct(self, Pixel, pixel); - intensity = RoundToQuantum((0.299*pixel->red) - + (0.587*pixel->green) - + (0.114*pixel->blue)); + intensity = ROUND_TO_QUANTUM((0.299*pixel->red) + + (0.587*pixel->green) + + (0.114*pixel->blue)); return ULONG2NUM((unsigned long) intensity); } @@ -1924,13 +1924,13 @@ Pixel_from_MagickPixelPacket(MagickPixelPacket *pp) { Pixel *pixel; pixel = ALLOC(Pixel); - pixel->red = RoundToQuantum(pp->red); - pixel->green = RoundToQuantum(pp->green); - pixel->blue = RoundToQuantum(pp->blue); - pixel->opacity = RoundToQuantum(pp->opacity); + pixel->red = ROUND_TO_QUANTUM(pp->red); + pixel->green = ROUND_TO_QUANTUM(pp->green); + pixel->blue = ROUND_TO_QUANTUM(pp->blue); + pixel->opacity = ROUND_TO_QUANTUM(pp->opacity); return Data_Wrap_Struct(Class_Pixel, NULL, destroy_Pixel, pixel); } #endif