MP 0.39: Alpha value on color selector dialog is ignored

*** Please report new bugs here! ***

Moderators: helmut, XnTriq, xnview, Dreamer

Post Reply
ZEUStiger
Posts: 17
Joined: Mon Aug 15, 2011 10:29 am

MP 0.39: Alpha value on color selector dialog is ignored

Post by ZEUStiger »

Although color selector dialog has a field for alpha channel (I believe it is some sort of default picked for Qt, right?) and the selected color is shown on the button with the transparency, it is, however, ignored for XnView functions, which use alpha values from custom fields near colorselect button. It would be nice, if not to get rid of custom alpha field entirely, at least transfer alpha values from color pickers to them. In case if custom fields were removed, it would also be nice to have a checker background under color preview on buttons to make alpha-transparency more visual.
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: MP 0.39: Alpha value on color selector dialog is ignored

Post by xnview »

Where alpha value is ignored?
Pierre.
ZEUStiger
Posts: 17
Joined: Mon Aug 15, 2011 10:29 am

Re: MP 0.39: Alpha value on color selector dialog is ignored

Post by ZEUStiger »

Example:
1. Open any 32-bit image with alpha transparency.
2. "Image" > "Canvas resize..."
3. Specify larger size.
4. Open "Background color" picker.
5. Choose black colour. Do not close the color picker.
6. There is an "Alpha channel" input box right above the "OK/Cancel" buttons. Set it to anything non-opaque, say, 128. Press "OK".
7. As you can see, color in "Background color" button is not black, it's half-transparent.
8. Press "OK".
Added color would not be half-transparent black, but opaque black instead. This is because alpha values from color pickers are ignored, but are rather used from your own alpha input fields, like the one in "Resize canvas" right next to the "Background color" button. Try to do the same, but enter 128 alpha not in the color picker, but in the field next to "Background color" button. It is half-transparent now.

It's better either to remove alpha field from color picker and use your own fields, or to remove your field and use alpha from color picker, which is more sensible way.
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: MP 0.39: Alpha value on color selector dialog is ignored

Post by xnview »

ZEUStiger wrote: Added color would not be half-transparent black, but opaque black instead.
ok, right. you have an alpha value field in dialog... So waht is better, alpha in dialog or alpha in color dialog??
Pierre.
ZEUStiger
Posts: 17
Joined: Mon Aug 15, 2011 10:29 am

Re: MP 0.39: Alpha value on color selector dialog is ignored

Post by ZEUStiger »

There is no difference in ease of access. But I would prefer using one from color dialog, as it is more straightforward and frees a bit of space in parent dialog.

It would also be cool to give button a checkerboard background, so transparency would be more visible.
For example, if I choose red color (255,0,0) with 64 alpha in color picker, it would look like the first picture here: http://imageshack.us/photo/my-images/83 ... 12233.png/
Instead, if you put checkerboard background (like second picture), it would be more obvious that the color is transparent.
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: MP 0.39: Alpha value on color selector dialog is ignored

Post by xnview »

Ok, right i'll add checkerboard
Pierre.
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: MP 0.39: Alpha value on color selector dialog is ignored

Post by XnTriq »

User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: MP 0.39: Alpha value on color selector dialog is ignored

Post by xnview »

Please check XnViewMP 0.48
Pierre.
ZEUStiger
Posts: 17
Joined: Mon Aug 15, 2011 10:29 am

Re: MP 0.39: Alpha value on color selector dialog is ignored

Post by ZEUStiger »

Fixed, though color preview on the button is now completely opaque, even when alpha < 255.
Post Reply