• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 290
  • Last Modified:

blended transparent gif

can you describe to me how to make a transparent gif which
is a white bar next to a black bar into a blended image such
that white is the transparent color and it uses a color
palette of 2 for black and white. If reasoned that if it was
grayscale then I would only have a very thin strip of white
on one edge to be the transparent color. So I want the pixels in the middle areas all to be either black or white
with no grays. Then all the white pixels will become
the transparent color and I will get some image feed through
in the middle area where the white pixels are. I tried a
blur attempt using the standard blur image filter but this
is no good at all. What I want to do id to make an image
which is  the same size as a planet map. A planet map is a
rectangular map which can be mapped onto a sphere and rotated. I want to make another rectangle having one half
black and then superimpose this overr the planet sphere to
simulate the night area. I could make slightly less than half black and then have a narrow area band on each black
to transparent trasition area which is the blended strip
which I want you to help me with. Also I considered making
the black half to be less than 100% black and have some
of the pixels to be white and transparent to similate moon
light on a planets darkened half. Thanks
1 Solution
johnh619Author Commented:
I just read what I wrote and it seemed confusing. In any case the
thing is suppose to be to replace and entire java applet which
creates a twilight area on a rotating planet. The applet is too
large and I figure a transparent gif overlay would be much simpler. The finished gif I wish you to explain would look like
a sphere with a black hemispher for the night side and it would
have a twilight area which I wish you to explain to me. The whole
idea is based on the idea of limiting the color palette to two
colors of black and white and letting white be transparent. It
must be a palette of 2. And then also the black half of the
planet can be the same with a palette of two and some white
blended in to be the transparent color. thanks
Exactly how you do it will depend on your tool.
This is how I would do it using Paint Shop Pro - I'm using version so all the menu options etc are for version 4 but it should be too different in version 5.  Also version 4 cannot create transparent GIFS - you would have to use version 5 for that bit or another image editor.

1) create a new image the same size sqare as you want you circle to be, e.g. if you want your sphere to be 300 pixels in diameter make your new image 300x300 pixels.
2) make sure your current background and foreground tool colours are black and white
3) flood fill the entire image, using the linear gradient fill style - this will give a nice graded black to white fill.
4) reduce the colours to 2 colours (black and white) by selecting  the menu option Colors|decrease Colour Depth|2 colours - this will display an options window to specify how the colours are reduced.  If you specify Nearest colour it will turn it into half black half white, instead you should use either ordered dither or one of the error diffusion methods.  Different diffusion methods provide slightly different results, experiment until you get the one you like best.
5) using the selecting tool create a circular selection area
6) invert the selection (ie exclude the circle), and colour the surrounding area white.
7) specify white as the transparent colour (you may have to increase the colour depth back to 256 fo this) and save the image.

The keys to this are being able to flood fill with a linear gradient, and being able to specify error diffusion when you convert it to 2 colours.  Any tool that can do these two thing should be able to produce the effect quite easily.  I'm not sure if the image will produce the effect you want - it may not be smooth enough to mimic fading to black which uses various intermediate colours.

If you need any more help just ask.


P.S. you can get Paint Shop Pro at http://www.jasc.com/
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now