[rt #84963] Imager::Color::rgba() now returns integer samples
authorTony Cook <tony@develop-help.com>
Tue, 21 May 2013 10:22:59 +0000 (20:22 +1000)
committerTony Cook <tony@develop-help.com>
Tue, 21 May 2013 10:22:59 +0000 (20:22 +1000)
Changes
Imager.xs

diff --git a/Changes b/Changes
index 11a887a..ad9817b 100644 (file)
--- 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
 ===========
 
index f0b6c4d..7a3346e 100644 (file)
--- 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)