Tried C++ to D. Wrong result.
Stefan Koch
uplink.coder at googlemail.com
Mon Nov 27 14:35:39 UTC 2017
On Monday, 27 November 2017 at 14:08:27 UTC, Dmitry wrote:
> I tried translate C++ programm to D, but result is different.
>
> original:
> https://github.com/urraka/alpha-bleeding/blob/master/src/alpha-bleeding.cpp
> result (with removed alpha):
> https://github.com/urraka/alpha-bleeding/blob/master/media/alpha-bleeding-opaque.png
>
> my:
> https://pastebin.com/GzZQ7WHt
> result (with removed alpha):
> https://www.dropbox.com/s/xbjphlievboslv2/original-2.png
>
> What did I wrong?
>
> P.S. Also on an one image it was crashed at line 63 (range
> violation)
> https://pastebin.com/TenGusw0
> so I added ((index + 3) < N) into condition.
First I'd make sure that what you get out of dlib load is the
same as the c++ version gets.
Just use standard debugging techniques.
More information about the Digitalmars-d-learn
mailing list