aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Which image is loading Fastly .jpg or .gif? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Which image is loading Fastly .jpg or .gif?" Watch "Which image is loading Fastly .jpg or .gif?" New topic
Author

Which image is loading Fastly .jpg or .gif?

Anu Sri
Ranch Hand

Joined: Jul 29, 2002
Posts: 43
Hi All,
In my site there are so manu images which need to be load fast. I am not understanding both are taking same time, and I did not get correct answer. Please let me know.
Thank you
Anupama
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi Anu,
GIF compression is usually used to compress Computer Generated Graphics like icons and clip arts.
JPEG compression is generally used to compress photographs.
Now there are several parameters that can influence compression.
For GIF files, compression is improved if you reduce the number of colors that composes the image. Computer Graphics usually contain few colors, that's why it is better.
If you are using mainly computer graphics, try to scale, re-arrange or reuse images accross the HTML page, to reach your goal.
For JPEG files, compression is improved if you decrease the quality factor (or compression factor). It is usually a value from 0 to 100 (0 = maximum compression, 100 = best compression).
You need to use a Imaging Editing Application to be able to set these parameters (or use an image processing API). For static images, I prefer to use Adobe Photoshop, but you might prefer PaintshopPro or some other tool.
For photographic pictures, JPEG gives the best compression. To give you an example, I am trying to compress a photograph of dolphins under water whose size is 576x432 (I'm using Photoshop)
GIF 256 colors = 82K (quality of resulting image = OK)
GIF 128 colors = 60K (quality of resulting image = OK)
GIF 64 colors = 45K (quality of resulting image = poor)
GIF 32 colors = 31K (quality of resulting image = low)
GIF 16 colors = 22K (quality of resulting image = very low)
under that the image is difficult to see
JPEG 100% = 63K (quality of resulting image = perfect)
JPEG 80% = 31K (quality of resulting image = perfect)
JPEG 50% = 14K (quality of resulting image = near perfect)
JPEG 30% = 8K (quality of resulting image = OK)
JPEG 15% = 5.5K (quality of resulting image = poor)
JPEG 0% = 4K (quality of resulting image = low)
Hope this helps,
Anu Sri
Ranch Hand

Joined: Jul 29, 2002
Posts: 43
Hi Beno�t
Thank you for replying my query. I got some idea on images.
Thank you
Anupama
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Which image is loading Fastly .jpg or .gif?