displaying jpeg with transparency

N

News KF

Hi,

I do have an applet with a background Image.

I'd like to display a jpeg image and choose one arbitrary color as being
transparent.


This would allow me to dispolay the jpeg over the background.


The fact, that some pixel would be not changed due to the jpeg
compression and would not be pure white and therefore not transparent
wouldn't be a problem for my application.


thanks in advance and bye




nkf
 
R

Roedy Green

I'd like to display a jpeg image and choose one arbitrary color as being
transparent.

Jpeg has no pixels or transparency. You will have to convert to gif
or png first.
 
O

Oliver Wong

News KF said:
Hi,

I do have an applet with a background Image.

I'd like to display a jpeg image and choose one arbitrary color as being
transparent.

This would allow me to dispolay the jpeg over the background.

The fact, that some pixel would be not changed due to the jpeg compression
and would not be pure white and therefore not transparent wouldn't be a
problem for my application.

Okay, that's nice.

... Oh wait, did you have a question?

I don't see a question mark anywhere in your post...

Let me put on my mind reading hat, and try to guess what your question
is, and then answer it.

Okay, the answer is to scan through the VolatileImage loaded in memory
and replace every white pixel with a transparent one. Hope that helps.

- Oliver
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top