Slashdot Mirror


JPG Compression - The Bandwidth Saver

Mr.Tweak writes "TweakTown has posted an article entitled "JPG Compression - The Bandwidth Saver". An article for webmasters and site owners showing how they can significantly reduce the amount of bandwidth they use by compressing JPG images, one of the most common formats for web images. If you own a website and don't yet have knowledge in the field of JPG compression, you should find this very interesting indeed - Save money on bandwidth and please viewers at the same time with quicker loading webpages. They also talk briefly at JPEG2000."

21 of 314 comments (clear)

  1. More advice by kindbud · · Score: 4, Funny

    Computers can make problems requiring complex repetitive calculations a much less onerous task to solve. I highly recommend that people apply computers to difficult scientific questions.

    --
    Edith Keeler Must Die
    1. Re:More advice by Admiral+Mouse · · Score: 4, Funny


      And get this... apparently images are not the only things that computers can compress. I've just learned that there are a slew of programs out there that can compress text-data with amazing ratios.

      Staggering.

      --
      Life if possible, art at any cost.
  2. JPG? by ar1550 · · Score: 4, Funny

    Compression? I'd just been renaming my .bmp's to .jpg - you mean I actually have to "compress" them to a .jpg to gain any benefit? Wow, my readers will sure be pleased. Next, you'll be telling me that my Flash-only websites should use shapes & instances instead of manually manipulating every pixel.

    --
    I once shot a man in Reno 'cause they cancelled Firefly.
    1. Re:JPG? by kzinti · · Score: 5, Funny

      You laugh, but I do have a couple pictures I've gotten of people over the years ... that are small (res wise) .JPGs, about 400-600kb each.

      Reminds me of the friend who wanted to know why his page of family photo thumbnails was taking so long to load. He was using JPEG files, and was shrinking them down to 128x128, but the page was still taking many minutes to load. I took a look at his HTML, and saw that each thumbnail was specified as <img src="p000001.jpg" width="128" height="96">, etc. The trouble was that p0000001.jpg was the full-resolution image! Each one weighed about 500K. He had "shrunk" them by changing the width and height in the img tag - in other words, the browsers were downloading twelve or so full-size images then scaling them into thumbnails. The good part was that clicking on a thumbnail, to see the full image, was instantaneous as the full image was already in the browser's cache.

      I didn't have the heart to tell him how clueless his page was.

      --Jim

  3. Power Switch - The Energy Saver by wadetemp · · Score: 5, Funny

    In other news:

    Anonymouse Cowarde has posted an article entitled "Power Switch - The Energy Saver". An article for geeks and computer owners showing how they can significantly reduce the amount of power they use by turning off your computer when you're not using it, using one of the most common buttons found on the front of most PCs. If you own a computer and don't yet have knowledge in the field of energy, you should find this very interesting indeed - Save money on electricty and please your significant other at the same time with a quieter room and lower energy bill. They also talk briefly at APM.

  4. *blinks* and this appears on the front page.. why? by Aanallein · · Score: 5, Insightful

    Short run down of the linked-to article:
    Non-compressed images have a large filesize and cost a lot of bandwidth, compressed images look almost as good and cost less bandwidth.
    Guide to compress images in PSP 7: save, move slider.
    conclusion: compressing is good, hope you found this useful.

    *shakes his head sadly* Slow down are fine, but c'mon - we're geeks you know; we can be expected to at least know *some* things...

  5. What's the best way to speed up your connection? by NanoGator · · Score: 4, Funny

    Q: What's the best way to speed up your connection?
    A: Run less data through it.

    I can write an article about this if Slashdot is interested.

    --
    "Derp de derp."
  6. Whoops! by CaseyB · · Score: 5, Funny

    Pardon me, I seem to have accidentally stepped into a conversation from 10 YEARS AGO.

  7. Come on..... by josh+crawley · · Score: 5, Insightful

    Now, I can understand if slashdot wants to put techie reviews or such other geek stuff. That's understandable, in the case of YRO, company product release (that april spoof about sponsoring products was true, wasnt it?), and software issues.

    HOWEVER, this is a geek site, which we talk as deeply as going about SMP on x86 systems and remodding systems into other cases (mechanics and engineering, lest that be software or hardware). However, that journalistic line (if there even was that line) has been crossed with this idiotic article. Let's re-read this again to see if it doesnt state the obvious. Also, I'm going to _assume_ that techie people on this website (most all) knows that jpeg is a compression....

    Compression - The Bandwidth Saver

    Hell, even non-techie people still know that if I zip that file, it doesnt take as long.... This article just insults our intelligence. Slashdot is becoming more and more like TechTV for the net.

    And as a last mote, moderators, pay attention to *important stuff* below every post. This article is anything but offtopic.

  8. Choose your compression with care... by tjwhaynes · · Score: 5, Interesting

    While compressing your images should be right up there on the Web designer 101 course, sometimes I despair that the wrong types of compression are chosen.

    JPEG is an excellent compression method for photographic images, both colour and greyscales. The image distortion is not noticeable by most people even at high compression ratios and the resulting image is close enough to the original.

    JPEG is NOT an excellent compression method for line diagrams, maps and bitmaps featuring a limited colour palette - the artifacts created by the transforms used by the algorithms blur rapid changes in colour and can make text unreadable. Even worse, for most diagrams, PNG lossless compression yields smaller results because of the limited palette and large amount of redundancy inherent in the data.

    JPEG 2000 promises even better compression ratios with superior image quality. Wavelet compression methods tend to reduce the amount of blur caused by the discrete cosine transforms and are better at handling rapid changes in colours. But that doesn't mean that it is a blanket solution.

    I also look forward to the day when SVG is a widely available and widely supported browser option. We can all benefit when complex layouts can be described in terms of vectors and colour fills rather than overlarge and complex bitmaps for the classic web page touches like 3D colour balls and arrows. That will also save bandwidth while increasing the flexibility and variety of images on the web.

    Cheers,

    Toby Haynes

    --
    Anything I post is strictly my own thoughts and doesn't necessarily have anything to do with the opinions of IBM.
  9. Re:Wayback machine by GigsVT · · Score: 4, Funny

    Man, now I am going to have to redesign my page to get rid of all those uncompressed TIFFs.

    --
    I've had enough abrasive sigs. Kittens are cute and fuzzy.
  10. JPEG is not appropriate for all images by Ryu2 · · Score: 4, Informative

    The article didn't discuss the merits of other formats vs. JPEG enough. Namely, non-photograhic images, with few colors and mostly large solid areas, such as icons, bullets, line drawings, diagrams, charts, etc. are not optimal for JPEG.

    In such cases, GIF and PNG will yield much better compression than JPEG, and also look nicer, since they're lossless. Compressing such images with JPEG will give you ugly "ringing" artifacts, since the lines are essentially infinite-frequency "spikes" which you can't capture completely.

    --
    There's 10 types of people in this world, those who understand binary and those who don't.
  11. How jpegs work. by furchin · · Score: 4, Informative

    I got trapped into clicking the link to the article, thinking it could be something useful about jpeg compression and how it works. The story certainly implied that. How disappointed I was, and I agree with most people that this is one of the dumbest stories ever. This kind of story belongs in a site for amateur wanna-be web designers, not geeks. Anyway, since I've gotten all caught up in this, and you're here too, maybe we can have a useful discussion on How JPEG Compression Works.

    I am by no means an expert, and I believe this is a gross simplification of the process, but here is what I think happens. The jpg alg breaks the image apart into 8 pixel by 8 pixel subimages. (Don't ask how it handles pictures that are not n*8 x m*8 in size). Then it treats each of those images with a process very similar to principal component analysis, where a set of representative images are given associated multipliers of how much of that image to add into the reconstructed original image the user is trying to get. These representative images are ordered from least to most detailed, and since they are known to both the compressor and the uncompressor (depressor? :), only the associated values need to be stored. I believe the first image deals with how much darker the left half is than the right half of the image, the second does the same thing horizontally, the third deals with how much darker the leftmost quarter of the image and the third quarter of the image are darker than the other two, and so on...

    So how does one adjust image quality / compression? Well every possible 8 x 8 picture can be represented with 64 of these representative images. However, since the 64th deals with *really* minute details, then you can get a decent reconstruction using just 63. It all depends on the image you are trying to compress, but can probably get away with even just the first 20 of the basis images. Oh, for the record, I'm talking about grayscale here. I think you'd need to ramp things up by a factor of 3 to do rbg.

    If someone wants to fill in any gaps or factual inaccuracies, certainly do so.

  12. Instead of GIF, use PNG or SWF by yerricde · · Score: 5, Informative

    Although jpg compression is definitely helpful, the article forgets to mention that two image formats are supported by all browsers. GIF being the second.

    In addition, 4.0 and newer browsers support Portable Network Graphics (PNG).

    GIFs should be used for vector based graphics

    No they shouldn't. Use PNG for still images. Use SWF (now an open format) or MNG (not much browser support yet but works in Mozilla and Konqueror) for animations.

    and provides a better overall quality/size advantage when done right.

    PNG can be 10% smaller than GIF when crushed properly.

    --
    Will I retire or break 10K?
  13. aol recompresses your jpegs by Chaostrophy · · Score: 5, Informative

    At my last job, we wondered why our carefully tuned images looked like shit on AOL. We found they were recompressing our jpegs to make them much smaller (and thus lower quality). So we now send AOL really high quality jpegs so that our images don't get trashed as badly by AOL.

    --
    Plato seems wrong to me today
  14. interesting article... by um...+Lucas · · Score: 4, Interesting

    It would be interesting, if it'd been written and posted in 1992, rather than 2002.

    I don't know who i'm most disappointed in.

    A - Tweaktown, for posting such an inane article in the first place
    B - MrTweak, for relaying it to slashot. Of course, he probably wrote it.
    C - Hemos for posting it.

    I mean really... the whole thing reeks of MrTweak wanting more site traffic and turning to slashdot with a story about anything to get it. Like "oh my god, i didn't know i could COMPRESS graphics?"

    Proposal to slash: never accept submissions from people with obvious links to the article in question...

  15. A better title for this... by rossz · · Score: 4, Funny

    would be "Stating the fucking obvious."

    Jeez. Why is this on slashdot?

    --
    -- Will program for bandwidth
  16. The pain of rejection by Sloppy · · Score: 4, Funny

    I submitted this story in 1990 and it was rejected. What gives?

    --
    As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
  17. NEXT ON SLASHDOT by cygnus · · Score: 4, Funny

    new headline: "Attracting user attention with the tag!"

    --
    Just raise the taxes on crack.
  18. Save more - make your type _really small_?? by wytcld · · Score: 4, Insightful

    Smart site that, setting the style on their body text so that in Mozilla it's teeny-tiny. This form of compression saves the reader from time otherwise spent scrolling the screen. It saved me the time of even reading at all.

    What ever did happen to the idea that the Web is about letting the user set their browser's default type size to suit their eyes, and writing pages that honor the user's preference?
    ___

    --
    "with their freedom lost all virtue lose" - Milton
  19. Re:How coincidental. by Glenn+R-P · · Score: 5, Informative

    I'd like to see some kind of lossy PNG

    That's JNG (JPEG Network Graphics) which is JPEG wrapped in PNG-style chunks along with an optional alpha (transparency) channel. Mozilla will display them and IrfanView will process them.

    The JNG spec is available somewhere on the PNG web site, http://www.libpng.org/pub/png