Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Turning white pixels transparent and getting clean edges in Photoshop CS3

Posted on 2008-10-12
3
Medium Priority
?
2,508 Views
Last Modified: 2013-12-20
I have a gif with a white background, and I want to turn all the white pixels in that gif transparent.  I followed the advice of the accepted solution in this thread:

http://www.experts-exchange.com/Software/Photos_Graphics/Images_and_Photos/Adobe_Photoshop/Q_23220932.html

Unfortunately there were off-white pixels that stood out against non-white backgrounds, making the whole thing look messy.  Does anyone have any suggestions as to how I can clean up these edges?

Thanks
0
Comment
Question by:deafpanda
3 Comments
 
LVL 9

Accepted Solution

by:
Sci-Fi-Si earned 1000 total points
ID: 22696991

I find if the image you are trying to blend in with a different background colour than the one it was originally rendered to looks bad, you can do:

1. Select > Load selection (this will select the outline of your image)
2. Select > Modify > Border (I use 2 for the width, depending on size of image)

You then might want of adjust the Opacity to 50% or whatever looks right.
Once your image looks smooth in Photoshop, you can make it look just as good in a browser by uning the .png 24 image format - this format preserves the Alpha channel of the image and avoids the problem of .gif's where it is either transparent/not transparent and leaves a nicely blended image identical to how it looks in Photoshop.

3. File > Save for Web & Devices (your save options should have GIF, JPEG, PNG-8, PNG-24, WBMP) select PNG-24 and save the image.

Voila.

All the best
Sci-Fi Si
0
 
LVL 26

Assisted Solution

by:David Brugge
David Brugge earned 1000 total points
ID: 22699997
(just to expand on what Sci-Fi Si said...

There is a lot of old, outdated advice out there that tells you to that if you want transparency on a web site you have to use a gif.

While it it true that in the old days, browsers only supported gif and jpeg's, today, all modern browsers support PNG files as well (but beware because not everyone is using a modern browser yet).

As Si-Fi pointed out on his excellent suggestion, 24 bit PNG files will let you have files that will taper off at the edges so that it blends with the background. (as you found out, GIF files chop off at the edges leaving semi-transparent pixels still showing and the edges jaggy.)

24-bit PNG files are definiately the way to go to get smooth transparent edges. However, if the person viewing your site is using Internet Explorer 6 or earlier, the transparent areas will appear gray. There is a java code fix that you can apply to your web site which will make IE 6 and IE5.5 render 24-bit PNG files correctly.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question