PDA

View Full Version : Transparent-can you make .jpg


Greg
01-21-2003, 08:23 AM
I know that you can make gif"s and bmp's transparent can you make jpg transparent if so how do you write it?

Zero Angel
01-21-2003, 09:56 AM
You cant make JPEGs transparant, you cant make BMP files transparant either.

DCElliott
01-21-2003, 09:58 AM
No you can't make JPEGs transparent.

You can, however, make most simpler graphics as gifs if you use a well optimized palette. And for simpler graphics gifs are way smaller, especially if you use a 16 color palette. JPEGs have to pack 3 bytes per pixel and require a complex mathematical transform to be regenerated. At 1 byte per pixel for 256 colors and as low as 2 bits per pixel for monochromatic images (thats four pixels per byte) you can have incredibly small images.

If you look at the banner graphic here (http://www3.ns.sympatico.ca/d.elliott/webtools/tools.gif) you can see what I am talking about. Despite being 800x80 it is < 4000 bytes. So, learn to use optimized gifs wherever possible.

Portable Network Graphics is a new graphic file type that will incorporate advanced lossless compression as well as transparency and other alpha effects such as transparency gradients like in high-end image editing programs. Although done with CSS trickery, you can get a taste of the future of transparency effects here (http://www3.ns.sympatico.ca/d.elliott/iris.html) (plus it is another chance to brag up my own pages ;)) PNG is not well supported yet and its standards and capabilities are evolving.

I'd like to see some of our graphics gurus wade in here. Geforc3, AnimGirl - give it a shot.

Greg
01-21-2003, 10:32 AM
Zero and DC,

Thanks, was asking for my brother, he is doing some pages
and he did not think you could but got a jpg he wanted to
if he could so I thought I would check in here to see if it was
possible!

Geforc3
01-21-2003, 01:44 PM
Here i'm!! :D

I always use normal jpg files in my work if i need a transparant part then i use *.gif but *.gif is very low quality jpg is way nicer.

There also is *.png but i never used it for a webdesihn i Made!!

here a graphics design http://weirdfellows.2ya.com this is al *.jpg

animgirl
01-21-2003, 04:52 PM
I always use normal jpg files in my work if i need a transparant part then i use *.gif but *.gif is very low quality jpg is way nicer.

Well, that kinda depends on your app.
I find .gif to be very nice sometimes because it doesn't apply the compression .jpg does at lesser image quality settings.

I mean, most of the time if you take a photograph and save it as a .gif, yeah it's gonna look crappy, but for simple logos, and for when you need transparency, .gif is good.

i.e. A small logo with 152 colors

Saved as a .gif with the highest .gif settings, it would take approx 2 sec. @ 28k and is 2.28 kb

Saved as a .jpg with the highest .jpg settings, it would take approx. 4 sec. @ 28k and is 7.61 kb.

Or, it could to be saved as a .jpg with the same size & download time as the .gif, on the .jpeg image quality scale, it would be approx. 50% .jpeg quality to measure up to the .gifs 100% quality.

But, gefor3's site is all jpg's and it looks wonderful and seems to load quickly.

So, I think the best thing is not to make a theory out of anything and just experiment and find what best suits your app.

(I just inserted the picture to show you what a logo with 152 colors may look like)

MikeParent
01-22-2003, 04:10 AM
Just to expand on this:

Images (including photos, despite a popular misconception) with large areas of flat color often compress to lower file sizes using the GIF format.