From: Tony Cook Date: Tue, 21 May 2013 10:22:59 +0000 (+1000) Subject: [rt #84963] Imager::Color::rgba() now returns integer samples X-Git-Tag: v0.96_01~16^2~26 X-Git-Url: http://git.imager.perl.org/imager.git/commitdiff_plain/b482243a1dde6b18f21133281a2a0ba17e372c30 [rt #84963] Imager::Color::rgba() now returns integer samples --- diff --git a/Changes b/Changes index 11a887a2..ad9817b5 100644 --- a/Changes +++ b/Changes @@ -14,6 +14,10 @@ Imager release history. Older releases can be found in Changes.old https://rt.cpan.org/Ticket/Display.html?id=74540 + - Imager::Color's rgba() method now returns it's values as integers + instead of floating point. (IV instead of NV). + https://rt.cpan.org/Ticket/Display.html?id=69243 (partial) + Imager 0.96 - 19 May 2013 =========== diff --git a/Imager.xs b/Imager.xs index f0b6c4d9..7a3346ea 100644 --- a/Imager.xs +++ b/Imager.xs @@ -954,10 +954,10 @@ ICL_rgba(cl) Imager::Color cl PPCODE: EXTEND(SP, 4); - PUSHs(sv_2mortal(newSVnv(cl->rgba.r))); - PUSHs(sv_2mortal(newSVnv(cl->rgba.g))); - PUSHs(sv_2mortal(newSVnv(cl->rgba.b))); - PUSHs(sv_2mortal(newSVnv(cl->rgba.a))); + PUSHs(sv_2mortal(newSViv(cl->rgba.r))); + PUSHs(sv_2mortal(newSViv(cl->rgba.g))); + PUSHs(sv_2mortal(newSViv(cl->rgba.b))); + PUSHs(sv_2mortal(newSViv(cl->rgba.a))); Imager::Color i_hsv_to_rgb(c)