What's new

transparency


Anamacha

Well-Known Member
Messages
91
Likes
0
Quick question about transparency:

Say you've got an image that has a background of a single colour. Say you want to take that colour and make it transparent.

If the image in in Indexed colour mode, then you can view the colour table for that image ... and presumably assign one of the colours to be 'transparent,' no? How do you do that? When I click on one of the colour swatches, it then brings up the Picker ... where you CANNOT select Transparent.

What gives?


thanks

Anam
 

Tron

Guru
Messages
1,176
Likes
9
Anamancha
You can use the Save for Web command and save the image as a 'gif' file. Select the transparancy check box on the top right of the window.
Check Marks site for an excellent tute on saveing transparent images :perfect: He walks you through teh whole process including getting ride of the fuzzy edges. :D
 

theKeeper

Guru
Messages
2,313
Likes
63
Ya that tute is good if you are trying to export a finished image, thanks Rick.

However... :D

To remove a specific colour from an image an make it transparent instead, try this:

  • 1) Open your image.

    2) Either convert it or check to make sure it is using INDEX colour mode. Accept defaults when PS does the conversion (if it has to).

    3) Open the IMAGE menu and under MODE choose "Color Table...". The resulting palette you'll see is the exact palette for your current image. Click on the "Eyedropper Tool", and from that colour palette or your image, just click on any colour you want, to change it to transparency instead. Keep clicking away on the colours til you find the one you'd like to remove. Then click OK to apply the new palette.

    Then, if you like, you can now convert the image to (or back to) RGB mode. This will retain the transparency, and allow you to use a larger colour palette to further edit the image. [/list:u]

    How's that work for ya? [slick]

    NOTE: You'll have to bear in mind though that the above method is being applied while in Index mode. And as such, the chances of getting really smooth looking edges after removing a colour are slim & none.

    In which case, use the Magic Wand at a 32 Tolerance setting, with "Contigious" unticked, and "Anti-Aliasing" ticked. Then click on the colour within your image and press Delete -- make sure that you're NOT working on a "Background" layer though. The image must be on a "normal" layer which uses alpha transparency. In fact, you should create a normal white filled layer and put it right below your image, so when you delete the colour, you'll be able to see right away if the tolerance was set ok or not. Then you can always Undo if need be and retry.
    The Tolerence level may need to be adjusted for your specific needs.

    HINT: The "Color Table..." option is not avaliable in RGB mode. Only in Indexed.
 

Anamacha

Well-Known Member
Messages
91
Likes
0
woo!

Perfect. Thanks Mark. That's just what I wanted to know. I haven't TRIED it yet, but that's what I wanted to know.

Does anyone know WHY this sort of thing works only with Indexed and not with RGB colour modes?



Anam
 

vogonpoet

Well-Known Member
Messages
98
Likes
0
yup

the gif file format only supports a maximun of 256 colours, therefore an RGB document (image) needs to be converted to index mode, thereby reducing the colours available from millions down to a max of 256.

This is why it is a general rule that when optimising images for the web, images with fewer colours, especially 'line art' images and images with 'sharp colour transitions' , the gif format is better.

For images that are 'photographic' in nature, or have 'soft colour transitions' , or millions of colours, the jpg (jpeg) format is more suitable.


Gif is generally used when needing transparency or when making an animation, but is not good for photos.

The png format also supports transparency and supports better transparency, due to its ability to let pixels have stages of transparency, whereas, with the gif format, a pixel is either visible or transparent (no inbetween). Png is good, however it is not fully supported by all web browsers so far, so using it might not suit your needs.

:perfect:
 

Alistair

Guru
Messages
817
Likes
1
That brings me to a question, why does gif only support 256 colours? And how many colors does jpeg, tiff, pcx, and all the others support?
 

Top