GIF transparent colour turning bright pink

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
PB
Part Of The Furniture
Part Of The Furniture
Posts: 2927
Joined: Sun Jan 03, 2010 5:45 pm

Re: GIF transparent colour turning bright pink

Post by PB » Fri Dec 01, 2017 3:27 pm

I have never said that the transparent pixels should be normally display to the user in magenta (although IIRC the resource editor in MSVC6 did this to indicate which pixels are transparent). I suggested to draw GIFs with transparency mask as they are intended to be displayed, i.e., the applications paint the background where the pixels are transparent.

That's what I think most image viewers as well as web browsers and Windows Explorer do. I do not understand why you are so against following their example. OTOH, image editors need to tbe clear in telling the designer that those pixels are invisible and they usually use some kind of pattern, e.g. checkered in Adobe PhotoShop or COREL PhotoPaint or some kind of diagonal hatches in your PSPro screenshot.

As I wrote above I do agree that it is certainly unexpected that magenta color used internally affects the result of wxImage::Rescale() when wxIMAGE_QUALITY_BILINEAR or wxIMAGE_QUALITY_BILINEAR is used and it should be reported to the wxWidgets developers...
Last edited by PB on Fri Dec 01, 2017 3:28 pm, edited 1 time in total.

Rocketmagnet
Experienced Solver
Experienced Solver
Posts: 79
Joined: Wed Aug 09, 2006 11:14 pm
Location: London
Contact:

Re: GIF transparent colour turning bright pink

Post by Rocketmagnet » Fri Dec 01, 2017 3:28 pm

Hi PB,

I tried using wxIMAGE_QUALITY_HIGH, but the results still show pink leakage.
High_quality_rescale.png
Using wxIMAGE_QUALITY_HIGH still shows pink leakage.

Rocketmagnet
Experienced Solver
Experienced Solver
Posts: 79
Joined: Wed Aug 09, 2006 11:14 pm
Location: London
Contact:

Re: GIF transparent colour turning bright pink

Post by Rocketmagnet » Fri Dec 01, 2017 3:35 pm

Hi PB,

Can we at least agree on one thing, that the code in gifdecode.cpp is actively changing one of the colors in the image, and that it is this code that is responsible for the pink colour I am seeing?

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2927
Joined: Sun Jan 03, 2010 5:45 pm

Re: GIF transparent colour turning bright pink

Post by PB » Fri Dec 01, 2017 3:45 pm

Rocketmagnet wrote:I tried using wxIMAGE_QUALITY_HIGH, but the results still show pink leakage.
Mhm, it does for me now too. I must have confused it with another value, sorry.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4995
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: GIF transparent colour turning bright pink

Post by ONEEYEMAN » Fri Dec 01, 2017 4:18 pm

Hi, Hugo,
You can try.
Either open a ticket on trac.wxwidgets.org or send an email to wx-dev ML.

But before doing that check if you can reproduce it on the Git HEAD...

Thank you.

Rocketmagnet
Experienced Solver
Experienced Solver
Posts: 79
Joined: Wed Aug 09, 2006 11:14 pm
Location: London
Contact:

Re: GIF transparent colour turning bright pink

Post by Rocketmagnet » Fri Dec 01, 2017 4:37 pm

Hi ONEEYEMAN,

I have cloned the git repository, modified the code and created a patch. I will now submit this patch using trac.

Thanks

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4995
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: GIF transparent colour turning bright pink

Post by ONEEYEMAN » Fri Dec 01, 2017 4:45 pm

Hi,
First of all - did you see if it works there? Because it may be already fixed by other means.
Just compile the sources and use the drawing sample to check if the image works correctly.

Or try it with your own software...

Also, don't forget to put this thread as a reference in the ticket. Vadim or whoever will look at that won't know about this.

Thank you.

Post Reply