Artifacts on white areas of image button

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

 
Thread Tools Search this Thread Display Modes
Old 04 April 2014   #1
Artifacts on white areas of image button

So please copy the image file I have attached below, and put it in your c: directory. Then run this maxscript code:

theBmp = "c:\\ArchInt_Lightbulb_Icon.jpg"
rollout image_button_test "Image Button"
(
button theButton "test" width:50 height:50 images:#(theBmp,undefined, 1,1,1,1,1 )
)
createDialog image_button_test 100 100


Check that the results look like my second attachment (result,jpg).

Anybody know why do all the white parts of the image appear greyish and artifacty in the rollout?

Thanks.

- Neil
Attached Images
File Type: jpg ArchInt_Lightbulb_Icon.jpg (1.6 KB, 37 views)
File Type: jpg result.jpg (7.7 KB, 8 views)
 
Old 04 April 2014   #2
it's default transparent color. and it's not white as i remember. i couldn't find a way to resolve this issue.
as a workaround could be using imgTag instead of image button

Last edited by denisT : 04 April 2014 at 05:25 PM.
 
Old 04 April 2014   #3
Not sure if imgTag will work for my purposes, but I'll give it a try, thanks. If anyone else has more info on why buttons function like this, I'm all ears

- Neil
 
Old 04 April 2014   #4
Funny - the artefacts are black in my case, so i guess this is some color in the UI config ...
Of course ... the Max UI background is coming through in the artefacts

The mask is apparently defined by pure white pixels ( 255/255/255 ) - i leveled the color to contain 250/250/250 max and now the artefacts dissapeared
Attached Images
File Type: jpg image_edited.jpg (12.7 KB, 28 views)
__________________

PowerPreview: High Quality Nitrous Previews for 3ds Max 2012|2013|2014

[ Free Download (ScriptSpot) ]

Home of The Frogs | Online Portfolio

Last edited by spacefrog : 04 April 2014 at 07:37 PM.
 
Old 04 April 2014   #5
I also have some issues with pure black & white colors. But it seems to depend on the max's UI theme (dark/light). I made some tests on max2012 in classic gray theme and max2014 in dark theme :

max classic gray interface :
-- imgTag : pure black = visible
-- imgTag : pure white = visible
-- button img : pure white = transparent (Neil's img)
-- button img : pure black = visible

max dark interface :
-- imgTag : pure black = transparent
-- imgTag : pure white = visible
-- button img : pure white = transparent (Neil's img)
-- button img : pure black = visible

On imgTag, pure black seems to be a transparent reference under dark theme, not under light theme.
I found that the black in Neil's img is not pure black so I tried to convert some black area in pure black, some of the white transparent pixels were removed, not all of them.
When I have icons with buggy colors I use GIF format in indexed colors to change my pixels. It does the trick.

Also I was able to fully remove the buggy white pixels on Neil's img by opening the img as follow :

theBmp = opendBitmap "c:\\ArchInt_Lightbulb_Icon.jpg"
__________________
Rico)
=====================
 
reply share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 02:51 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.