|
From: Michael D. <md...@st...> - 2014-10-28 22:51:13
|
I get the same result with the patch. I’m not sure how the patch is
meant to work, particularly this part:
|--- agg_pixfmt_rgba.h (revision 104)
+++ agg_pixfmt_rgba.h (working copy)
@@ -264,10 +264,10 @@
{
if (alpha > color_type::empty_value())
{
- calc_type a = p[Order::A];
- calc_type r = color_type::multiply(p[Order::R], a);
- calc_type g = color_type::multiply(p[Order::G], a);
- calc_type b = color_type::multiply(p[Order::B], a);
+ value_type a = p[Order::A];
+ value_type r = color_type::multiply(p[Order::R], a);
+ value_type g = color_type::multiply(p[Order::G], a);
+ value_type b = color_type::multiply(p[Order::B], a);
|
It looks like this actually has less precision than before, or at best
is equivalent, since r, g, and b were being downcast in the call to lerp
anyway.
Mike
On 10/28/2014 04:49 PM, Wojciech Mamrak wrote:
> Have you tried my patch?
>
> 2014-10-28 21:03 GMT+01:00 Michael Droettboom <md...@st...>:
>> Any thoughts/pointers about where I could start to fix this?
>>
>> Cheers,
>> Mike
>>
>>
>> On 10/17/2014 02:25 PM, Wojciech Mamrak wrote:
>>
>> I thought it was more sophisticated, but it turns out that changes to
>> revisions [99, 102) were more involving.
>>
>> 2014-10-17 19:56 GMT+02:00 Wojciech Mamrak <wm...@gm...>:
>>
>> I might have a patch ready for this, brb.
>>
>> 2014-10-17 19:42 GMT+02:00 Jim Barry <ji...@ch...>:
>>
>> On 17 October 2014 17:52, Michael Droettboom <md...@st...> wrote:
>>
>> In agg-2.4, if I draw a rectangle path with RGB value of (0, 255, 102,
>> 64), the resulting pixel value is (0, 255, 102, 64).
>>
>> In agg-svn, I get (0, 255, 104, 64).
>>
>> it seems the difference is not so much in anything intentional
>> but from the fact that everything but the final demultiply is downgraded
>> to color_type, and then the demultiply happens. Whereas in the old
>> version, it’s still doing calculations in calc_type (uint16) up until
>> the final demultiply.
>>
>> Yes, I see the problem. I suppose it must have happened when refactoring for
>> the floating-point support. I will try to think of a solution.
>>
>> - Jim
>>
>> ------------------------------------------------------------------------------
>> Comprehensive Server Monitoring with Site24x7.
>> Monitor 10 servers for $9/Month.
>> Get alerted through email, SMS, voice calls or mobile push notifications.
>> Take corrective actions from your mobile device.
>> http://p.sf.net/sfu/Zoho
>> _______________________________________________
>> Vector-agg-general mailing list
>> Vec...@li...
>> https://lists.sourceforge.net/lists/listinfo/vector-agg-general
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Comprehensive Server Monitoring with Site24x7.
>> Monitor 10 servers for $9/Month.
>> Get alerted through email, SMS, voice calls or mobile push notifications.
>> Take corrective actions from your mobile device.
>> http://p.sf.net/sfu/Zoho
>>
>>
>>
>> _______________________________________________
>> Vector-agg-general mailing list
>> Vec...@li...
>> https://lists.sourceforge.net/lists/listinfo/vector-agg-general
>>
>>
>>
>> --
>> Michael Droettboom
>> Science Software Branch
>> Space Telescope Science Institute
>>
>> http://www.droettboom.com
>>
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> Vector-agg-general mailing list
>> Vec...@li...
>> https://lists.sourceforge.net/lists/listinfo/vector-agg-general
>>
> ------------------------------------------------------------------------------
> _______________________________________________
> Vector-agg-general mailing list
> Vec...@li...
> https://lists.sourceforge.net/lists/listinfo/vector-agg-general
--
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
http://www.droettboom.com
|