I would like to make a JPEG image file with some pixels that are partially transparent or fully transparent, similar to a PNG file with an alpha channel. Is this possible? If so, how would I go about doing this?
I would like to use the image on a website. If I try to do this, would it work in any or all of the popular browsers (IE 7+, Firefox, Safari)? Assuming it is possible, will it just work, or are there any tricks or hacks required to make it work?
EDIT: Some of the replies say I can't do this. However, I found this page describing a JPEG image with transparency. Does anyone know if there is a convenient way to produce files in this format? Is it widely supported?
Yes you can do this. The JPEG format makes provision for exchangeable image file format
JPEG/Exif is the most common for photography and JPEG/JFIF is the most commonly used for storage.
When the others state JPEG format doesn't provide for an alpha channel all they are really saying is that there is no widely used formats for JPEG encoding that include an alpha channel.
Have a look at On adding alpha channels to JPEG images, where the author describes and provides a solution to exactly what you are trying to do and uses the the canvas element to render on a browser.