Using white as transparent color
I've been told to use white as a transparent color. Cool.
However, it really sucks when I have a set of sprites where there is a few pixels that are a few splashes from white, and I really can't tell in Photoshop. Is there a trick to get around this, or do I have to go in and clean them up on my own?
However, it really sucks when I have a set of sprites where there is a few pixels that are a few splashes from white, and I really can't tell in Photoshop. Is there a trick to get around this, or do I have to go in and clean them up on my own?
Use Select->Color Range, set the Fuzziness to a little more than zero, click a white pixel in the image and OK the dialog. Make sure that your foreground colour is white and press Alt-Backspace to fill the selection with white.
You might have to experiment with the settings but you should get most of it that way!
[I moved your thread for hopefully obvious reasons.]
You might have to experiment with the settings but you should get most of it that way!
[I moved your thread for hopefully obvious reasons.]
If you have photoshop 5 (probably through 6 too) it is under image->adjust->selective color.
In TheGimp 1.2 it is right click->select->by color.
In TheGimp 1.3 (beta) it is select->by color (select is a menu on top of the window)
In TheGimp 1.2 it is right click->select->by color.
In TheGimp 1.3 (beta) it is select->by color (select is a menu on top of the window)
Quote:Originally posted by NCarter
Make sure that your foreground colour is white and press Alt-Backspace to fill the selection with white.
wait... "alt"?
Quote:Originally posted by erazorhead
wait... "alt"?
Haven't you ever had that discussion which goes:
"OK, now press option-e."
"Uh... what's option?"
"The key which says 'alt' on it. That's the option key."
"Why doesn't it say 'option' on it?"
"Er, well it used to. But now it doesn't. I don't know why. Just get on with it."
I know it's called option, you know it's called option, but many, many other people don't, so I usually refer to it by the name on the keycap. Force of habit!
BTW, thanks for the clarification, ClarustheDogCow. I keep forgetting that Adobe like to change the menu layout with every new version!
My option key says option on it very loudly... what kind of keyboard do you have?!
[Checks all the Macs in the office]
All of the Macs here have 'alt' keys! There's an old iMac style keyboard, four G4 keyboards and a couple of beige G3 ones and they all have the word alt on them. I haven't seen a keyboard which says 'option' for years!
All of the Macs here have 'alt' keys! There's an old iMac style keyboard, four G4 keyboards and a couple of beige G3 ones and they all have the word alt on them. I haven't seen a keyboard which says 'option' for years!
My G4 keyboard comes with an 'option' key... And so did all the iMacs which were in my school. Could it be that you live in the UK?
Did you ever wonder why we had to run for shelter when the promise of a brave new world unfurled beneath the clear blue sky?
How did you guess? 
Are you saying that only UK keyboards have the word alt instead of option, or is there some other localisation thing going on?
Do you think we're off topic enough yet?

Are you saying that only UK keyboards have the word alt instead of option, or is there some other localisation thing going on?
Do you think we're off topic enough yet?
The fact that the little sidebar by your name says 'London, UK' is a clue... 
My key actually has both - option is printed in large letters, and alt in smaller letters in the corner.
And, definitely no!!!

My key actually has both - option is printed in large letters, and alt in smaller letters in the corner.
And, definitely no!!!
Did you ever wonder why we had to run for shelter when the promise of a brave new world unfurled beneath the clear blue sky?
Quote:Originally posted by LongJumper
I've been told to use white as a transparent color. Cool.
However, it really sucks when I have a set of sprites where there is a few pixels that are a few splashes from white, and I really can't tell in Photoshop. Is there a trick to get around this, or do I have to go in and clean them up on my own?
So I'm assuming you want to get rid of the stray white pixels? If you have things in separate layers it is easy. Just use Levels and set the output on the white side of things slightly less, so in effect it will turn the whitest value into a shade of off-white very light gray. Then re-flatten and save your images and you should be fine. There isn't a way to magically figure out which pixels are masked and unmasked if you just have some .png or .tiff files though. You'll have to do it semi-manually. Use Color Range with fuzzyness of 0 to find all the white pixels, and manually select what areas you want changed. Then do the Levels thing.
Wouldn't it be easier just to include a 1-bit mask in a separate file, or use a filetype that supports masks? Then again, I've done this type of sprite masking in games too :-) (But I was using black instead of white)
-Jon
No, he wants, for example, the color RGB(254,254,254) to be treated as completely white and thus transparent. But I think levels could be used for that, too...
Did you ever wonder why we had to run for shelter when the promise of a brave new world unfurled beneath the clear blue sky?
My keyboard that came with the Quicksilver G4 has two keys with both alt AND option on them. How about that!
KenD
KenD
CodeBlender Software - http://www.codeblender.com
I've been using macs for 10 years and every one I've seen has
alt
Option on it.
alt
Option on it.
Quote:Originally posted by OneSadCookie
My option key says option on it very loudly... what kind of keyboard do you have?!
Check the new keyboards on the G5 and eMacs (and basically any new desktop Mac). It might be changed on that one. This new keyboard has an over-sized esc key. I *think* I might have seen the option-less alt key on that kind of keyboard.

