[Mono-dev] Problem with PNG transparancy on current Debian Unstable

Benjamin Schieder benjamin at anderdonau.de
Tue Jun 9 11:09:08 UTC 2015


 

I have found the bad commit (and learned how to use git bisect in the
process): 

[01:04:04][blindcoder at flora:~/Downloads/libgdiplus]$ git bisect bad
59ca17e56adb8555e9b4e0960b771f2849f6366f is the first bad commit
commit 59ca17e56adb8555e9b4e0960b771f2849f6366f
Author: Dick Porter <dick at acm.org>
Date: Thu Mar 31 16:02:19 2011 +0100

 Don't premultiply PNG images on loading, no other format does this.

 When drawing images, except when drawing onto a memory bitmap,
premultiply
 if needed.

 Fixes bug 426305, without breaking bug 324503.

:040000 040000 bc4a7075f87afdb5dc6e67c859cd82b06876d29e
cf1cea632be730ad978409f224766097ba1382ea M src
[git:(59ca17e...)|BISECTING][A:0][D:0][M:1][?:5] 

If I check out 059ca56800ccca8249260fac5e9e8b45291b8237, the
transparency is fine.
When I update to 59ca17e56adb8555e9b4e0960b771f2849f6366f, the
transparency is incorrect. 

Kind regards,
Benjamin 

Am 2015-06-09 12:45, schrieb Alexander Köplinger: 

> There aren't that many commits for pngcodec.c in the last 4 years (which is when 2.10 was tagged), so it's probably one of those: https://github.com/mono/libgdiplus/commits/master/src/pngcodec.c [1] . Shouldn't be too hard to figure out which one broke your scenario.
> 
> -- Alex
> 
>> To: knocte at gmail.com
>> Date: Tue, 9 Jun 2015 12:31:43 +0200
>> From: benjamin at anderdonau.de
>> CC: mono-devel-list at lists.ximian.com
>> Subject: Re: [Mono-dev] Problem with PNG transparancy on current Debian Unstable
>> 
>> Alright, I compiled libgdiplus 2.10 and put it into /opt/libgdiplus2.10/
>> I then did the following:
>> LD_LIBRARY_PATH=/opt/libgdiplus2.10/lib/
>> export LD_LIBRARY_PATH
>> ./transparancy.exe
>> 
>> And it works fine. So I guess there is a regression somewhere in 
>> libgdiplus between 2.10 and today.
>> 
>> 
>> Am 2015-06-09 12:17, schrieb Benjamin Schieder:
>>> I have this version on squeeze:
>>> ii libgdiplus 2.10-3+b1
>>> armel interface library for System.Drawing of Mono
>>> 
>>> And this version on unstable:
>>> ii libgdiplus
>>> 3.12-0xamarin1+jpeg62.1 amd64 interface library
>>> for System.Drawing of Mono
>>> 
>>> I'll try to compile a 2.10 version of libgdiplus, but that's a lot of
>>> difference and probably way above my head to bisect correctly.
>>> 
>>> Am 2015-06-09 11:50, schrieb Andres G. Aragoneses:
>>>> You could check what version of
>>>> libgdiplus(https://github.com/mono/libgdiplus) did Debian Squeeze
>>>> include, and try to run a custom new mono built from sources, with an
>>>> older libgdiplus, to confirm that it is a libgdiplus regression. If it
>>>> is, then after that you could try to bisect the commit that caused it.
>>>> 
>>>> On 09/06/15 11:40, Benjamin Schieder wrote:
>>>>> Hello Alex.
>>>>> 
>>>>> I have followed those instructions and done a dist-upgrade, but after
>>>>> re-compiling with mcs the problem persists unchanged. I have the
>>>>> following versions now:
>>>>> 
>>>>> [11:38:29][blindcoder at flora:~/Downloads/PZ/MapMap]$ mcs --version
>>>>> Mono C# compiler version 4.0.1.0
>>>>> [11:38:34][blindcoder at flora:~/Downloads/PZ/MapMap]$ mono --version
>>>>> Mono JIT compiler version 4.0.1 (tarball Thu May 28 09:08:28 UTC 
>>>>> 2015)
>>>>> Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors.
>>>>> www.mono-project.com
>>>>> TLS: __thread
>>>>> SIGSEGV: altstack
>>>>> Notifications: epoll
>>>>> Architecture: amd64
>>>>> Disabled: none
>>>>> Misc: softdebug
>>>>> LLVM: supported, not enabled.
>>>>> GC: sgen
>>>>> [11:38:37][blindcoder at flora:~/Downloads/PZ/MapMap]$ cli --version
>>>>> Mono JIT compiler version 4.0.1 (tarball Thu May 28 09:08:28 UTC 
>>>>> 2015)
>>>>> Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors.
>>>>> www.mono-project.com
>>>>> TLS: __thread
>>>>> SIGSEGV: altstack
>>>>> Notifications: epoll
>>>>> Architecture: amd64
>>>>> Disabled: none
>>>>> Misc: softdebug
>>>>> LLVM: supported, not enabled.
>>>>> GC: sgen
>>>>> 
>>>>> Kind regards,
>>>>> Benjamin
>>>>> 
>>>>> Am 2015-06-09 11:07, schrieb Alexander Köplinger:
>>>>> 
>>>>>> It works fine here with latest Mono 4.0.1.44 on Ubuntu. Can you try
>>>>>> upgrading to latest Mono from Xamarin by following
>>>>>> http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives 
>>>>>> ?
>>>>>> 
>>>>>> I suspect this has something to do with libgdiplus (the native 
>>>>>> library
>>>>>> most of the System.Drawing code calls into).
>>>>>> 
>>>>>> -- Alex
>>>>>> 
>>>>>> > To: mono-devel-list at lists.ximian.com
>>>>>> > Date: Tue, 9 Jun 2015 10:15:02 +0200
>>>>>> > From: benjamin at anderdonau.de
>>>>>> > Subject: [Mono-dev] Problem with PNG transparancy on current Debian
>>>>>> Unstable
>>>>>> >
>>>>>> > Hello.
>>>>>> >
>>>>>> > I have a problem with PNG transparancy in mono on current Debian
>>>>>> > Unstable.
>>>>>> > I created a small example (4 kB download) with minimal code and two
>>>>>> > example images:
>>>>>> > https://oc.anderdonau.de/index.php/s/VwTAlcjETG6j3XP
>>>>>> >
>>>>>> > Running this example on a current Debian Unstable results in this - bad
>>>>>> > - image:
>>>>>> > https://oc.anderdonau.de/index.php/s/AtVtba0tpSk4bn8
>>>>>> >
>>>>>> > Running the same code on an old Debian Squeeze (on armel) results in
>>>>>> > this - correct - image:
>>>>>> > https://oc.anderdonau.de/index.php/s/eqhmXh9qpBbg0WW
>>>>>> >
>>>>>> > Can someone help me with this issue?
>>>>>> >
>>>>>> >
>>>>>> > Kind regards,
>>>>>> > Benjamin
>>>>>> > --
>>>>>> > Jabber: blindcoder at jabber.ccc.de
>>>>>> > Twitter: https://twitter.com/blind_coder
>>>>>> > Web: http://www.benjamin-schieder.de/
>>>>>> > _______________________________________________
>>>>>> > Mono-devel-list mailing list
>>>>>> > Mono-devel-list at lists.ximian.com
>>>>>> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>>>> 
>>>>> Jabber: blindcoder at jabber.ccc.de <mailto:blindcoder at jabber.ccc.de>
>>>>> Twitter: https://twitter.com/blind_coder
>>>>> Web: http://www.benjamin-schieder.de/
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> Mono-devel-list mailing list
>>>>> Mono-devel-list at lists.ximian.com
>>>>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Mono-devel-list mailing list
>>>> Mono-devel-list at lists.ximian.com
>>>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>> 
>> -- 
>> Jabber: blindcoder at jabber.ccc.de
>> Twitter: https://twitter.com/blind_coder
>> Web: http://www.benjamin-schieder.de/
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list

Jabber: blindcoder at jabber.ccc.de
 Twitter: https://twitter.com/blind_coder [2]
 Web: http://www.benjamin-schieder.de/ [3] 

Links:
------
[1] https://github.com/mono/libgdiplus/commits/master/src/pngcodec.c
[2] https://twitter.com/blind_coder
[3] http://www.benjamin-schieder.de/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20150609/094a3015/attachment-0001.html>


More information about the Mono-devel-list mailing list