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."

94 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. Re:More advice by darien · · Score: 3, Funny

      I sspct lssy cmprssion s rthr mr ntcbl wth txt thn wth pctrs.

  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 jedrek · · Score: 2

      ? 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?

      You laugh, but I do have a couple pictures I've gotten of people over the years (that would be 14 years at the end of this summer) that are small (res wise) .JPGs, about 400-600kb each. They are, of course, 'uncompressed JPGs', meaning BMPs and TIFFs renamed to .JPG. I also have a couple of images -- real JPGs this time -- about 3000x2000 (the size of the scanner at 150DPI) where the photo itself is about 400x300px somewhere in the middle of that.

      The rest is white.

      So, yeah, this article could help some people out... but still:

      Worst thread ever

    2. 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. Re:JPG? by a_n_d_e_r_s · · Score: 2, Informative

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

      Why not ???

      It we never educate the clueless we will have a world of clueless people...

      For example people who write fantastic 'expert' 'high-tech' articles of how you could - gasp! - compress images so they are faster to download.

      By not helping him he will could spread his 'expert' knowledge to others. In the long run he probably would have been better off by you telling him the truth.

      --
      Just saying it like it are.
    4. Re:JPG? by jsprat · · Score: 2, Funny

      Those aren't thumbnails,
      they're dumbnails!

    5. Re:JPG? by Toraz+Chryx · · Score: 2

      That's a good idea for a file managemener plugin/extension actually, have it convert an image to whatever format you change the extension to...

    6. Re:JPG? by dhogaza · · Score: 2

      I've seen this on a *commercial* site. The owner asked me to take a look as to why his site was so slow to load. The (obviously incompetent to the extreme) local web developer he'd hired refused to resize the JPEGs, insisting I had no idea what I was talking about ...

    7. Re:JPG? by gad_zuki! · · Score: 2

      Worse, everyone who has read a paragraph about weblogging and quickly gets a blogger account does the same thing. Except they link to your image directory, embed up a 200k+ image, and then resize it in HTML. Thank Eris for referrer control in .htaccess.

    8. Re:JPG? by Toraz+Chryx · · Score: 2

      have it default to non-lossy compression if the format in question is 'lossy' (jpeg at 100% or whatever)

      at the least, translating in such a manner between BMP/TIFF/PGA etc...

    9. Re:JPG? by sharkey · · Score: 2

      He had "shrunk" them by changing the width and height in the img tag

      The guy who did our corporate page using Dreamweaver did the same thing.

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

      Don't bother. You'll just get a blank look.

      --

      --
      "Outlook not so good." That magic 8-ball knows everything! I'll ask about Exchange Server next.
    10. Re:JPG? by Moonshadow · · Score: 2

      PHP + GD.

      I run a VERY large online art gallery for a friend. She's fairly HTML-incompetent, and uploads 10-15 pictures a week. Automatic thumbnail generation + caching RULES. :)

      I'm on University broadband, so even HTML-resized images don't bother me too much, but it's the PRINCIPLE of the matter...

      Oh, and I use those fancy-schmancy compressed JPEG thingies as the thumbnails, too.

  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.

    1. Re:Power Switch - The Energy Saver by ncc74656 · · Score: 2
      Gosh, I hope they post about modems next ... I need help speeding up my 14.4 *cough*.

      One number:

      9.8 m/s^2

      --
      20 January 2017: the End of an Error.
  4. When... by Decimal · · Score: 2

    When are we going to start evolving these algorithims? It would have to be done by a really fast computer, but it's been shown that natural selection applies to computing as well. I'd imagine that it is possible to come up with an algorithim that's lossless and still as small as any equivalent .jpg file. Nature can come up with things we never even imagined. This technique has been used to create a sorting program that is smaller works faster than any we ever created manually. And we often can't figure out how it works. Not a clue!

    --

    Remember "Bring 'em on"? *sigh
    1. Re:When... by Phroggy · · Score: 2

      When are we going to start evolving these algorithims? It would have to be done by a really fast computer, but it's been shown that natural selection applies to computing as well. I'd imagine that it is possible to come up with an algorithim that's lossless and still as small as any equivalent .jpg file.

      You mean like PNG? The problem is browser support - old browsers may not render a new format consistently. Keeping two versions of every graphic and deciding which to send to the browser based on what it can handle is a pain. Having a significant percentage of potential customers see broken links all over everything is unacceptible.

      --
      $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
      $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
    2. Re:When... by Decimal · · Score: 2

      > I'd imagine that it is possible to come up
      > with an algorithim that's lossless and still
      > as small as any equivalent .jpg file.

      You mean like PNG? The problem is browser support - old browsers may not render a new format consistently. Keeping two versions of every graphic and deciding which to send to the browser based on what it can handle is a pain. Having a significant percentage of potential customers see broken links all over everything is unacceptible.

      No, I mean a lossless image (as png is) that would be the same size as a lossy image (as jpg is) with no loss at all. For a comparison, take a 24-bit color image with lots of detail and compress it into 2 formats - jpg and png. Notice how much smaller the jpg is? Now if you're already working with a reduced color image (256 or less) a gif image (lossless up to 256 colors) would be small and work in all graphical web browsers though the same image in png format would still be a lot smaller. Anyway, I was talking about evolving a new image format, not browser compatibility.

      --

      Remember "Bring 'em on"? *sigh
  5. *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...

  6. jpg vs gif by terradyn · · Score: 2

    Although jpg compression is definitely helpful, the article forgets to mention that two image formats are supported by all browsers. GIF being the second. GIFs should be used for vector based graphics and provides a better overall quality/size advantage when done right. Many non-professional webpages confuse the distinction and make solely jpg or gif based websites. He should also have explained the compression techniques using photoshop as that is a much more popular package (although I understand that many home grown websites might be using PSP, they are also the ones that don't really care about bandwidth since they're using geocities or other free hosts).

    1. Re:jpg vs gif by realgone · · Score: 2
      1) are these really the tools of choice for a majority of people who make Web sites?

      As an interactive production manager out here in NYC, I'd have to say "yes" -- at least on the professional side of things. Photoshop (w/ an assist from Illustrator) are *the* tools of the trade for creating static web graphics. (Don't mind the whimpering you hear from the back of the pack. Those are just the people who insist on using Fireworks...) =)

      Why use these "behemoths"? Because they let us put the design in "web design", which is ultimately what we get paid for. But there are still plenty of good solutions for the hobbyist crowd, including Photoshop Elements, which retails at $99 (not counting the $30 rebate for PSP users) and has all the features of Photoshop that a smaller web publisher would need.

      2) what percentage of those people actually use the software LEGALLY?

      Professional use? Most everyone. Personal use? I'd give 20% as a rough guess. I've got registered copies both at home and at work, but I'm probably an exception to the more general rule.

    2. Re:jpg vs gif by British · · Score: 2

      Times have changed for Paint Shop Pro, my friend. It has evolved quite a bit, and it's $100, compared to $600 for Photoshop.

      90% of the features of Photoshop for a fraction of the price.

  7. Memories of JPEG by Renraku · · Score: 2

    JPEG has been around almost as long as I can remember the Internet. I remember spending long hours downloading single pr0n pics from Lynx using the Kermit protocol. Too bad half of 'em were zipped bitmap files instead of JPEGs.

    --
    Job? I don't have time to get a job! Who will sit around and bitch about being broke and unemployed then?
  8. 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."
  9. LOL by Dwedit · · Score: 3, Funny
    As you can see from the 25:1 compressed image above, there is really not much of a difference in terms of image quality from the original image at 2:1 - but a save of 44.6kb in file size. Consider this as a practical example - a new piece of content you post has ten images in it, for simplicity reasons at 63.2kb each (632kb in total), we save a total of 465kb, seemingly not a great deal on an individual basis.

    Now say 2000 different people read that same review uncached, we save a total of roughly 908mb in outbound data bandwidth for that single review. If 5000 people were to read that review, we are talking gigabytes of bandwidth which can be saved through compression, 2.27gb to be exact. I'll let the stunning numbers speak for themselves.

    Sorta ironic how thousands of people are downloading that article right now!

  10. This will be a common conversation... by Navius+Eurisko · · Score: 3, Funny

    Web Designer 1: "Hey, this JPG compression will save our average 56k user about 5 seconds on load time."

    Web Designer 2: "That's means we can load even more useless content on our website and they won't notice the difference!"

    Web Designer 1: "As well as include more popup and banner ads, too!"

  11. aw shit! by paradesign · · Score: 3, Funny
    you mean i shouldnt have been using TIFs this entire time?!? no wonder my site loads so slow.

    i use LZW, if that helps?

    --
    I want 2D games back.
  12. Wayback machine by freeweed · · Score: 2

    Why does it feel like 1994 all over again?

    JPEG'ing images has been par for the course for any competant web designer since the very incarnation of the WWW.

    This is like having a 'news' article to the effect of

    "Make your HTML code smaller! Learn what the tags actually are and throw out FrontPage!"

    Oooo gee, wow!

    --
    Endless arguments over trivial contradictions in books written by ignorant savages to explain thunder in the dark.
    1. 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.
    2. Re:Wayback machine by freeweed · · Score: 2

      Good point, hell, I remember versions of Mosaic that didn't seem to support *anything* :)

      Point still stands though.. JPEG support is not only VERY (relatively) old, but proper JPEG use, if anything, was far more important way back when. Try accessing a modern 400K/page site with a 14.4 :)

      --
      Endless arguments over trivial contradictions in books written by ignorant savages to explain thunder in the dark.
  13. Watered down article? by winternj · · Score: 2

    For slashdot, I would expect at least something on the order of a tutorial, or perhaps some study on a better compression method for jpeg. obviously 99% of the readers here know that jpeg can be compressed.

  14. How coincidental. by Cutriss · · Score: 2

    Interesting that this would be posted no less than three days after Penny Arcade's screenshot rant from Wednesday.

    I have to say that I agree with Tycho and Gabe on this one. All too often I'm seeing websites post crappy images claiming that they show intricate detail of upcoming software, yet they compress it to the point that it looks like it came out of one of these.

    --
    "Mod, mod, mod...and another troll bites the dust."
    1. Re:How coincidental. by Ed+Avis · · Score: 2

      It's true, JPEG sucks for screenshots. Yet it can be a lot smaller than GIF or even PNG, so people may use it despite the loss of quality.

      I'd like to see some kind of 'lossy PNG'. PNG files are compressed using the LZH algorithm first used in pkzip, and now used in zlib, gzip and all sorts of places as well as PNG. This works by having a 'sliding window' where the last 32Kbyte or so of data is stored, and then looking back through that window to see if the current sequence of bytes has been output previously. If so, just output a referral back to where the sequence occurred before.

      But what if you modified zlib so it didn't require an exact match? You might say that having one pixel in every ten out of place, or set to a 'close enough' colour (eg dark grey instead of black), is good enough to find a match. Then you could generate PNG images which lost some of the original information, but wouldn't look quite as sucky as JPEG. And any ordinary PNG viewer would be able to display them.

      I don't know whether this would work well in practice but it's worth trying. Probably for dithered images it would be great but screenshots wouldn't be helped much without losing noticeable quality.

      --
      -- Ed Avis ed@membled.com
    2. 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

    3. Re:How coincidental. by Quietust · · Score: 2
      PNG files are compressed using the LZH algorithm first used in pkzip, and now used in zlib, gzip...
      You're partially right... PKZIP used to use LZW-based compression (the kind of compression used in GIF files - the one that's patented by Unisys) back in version 1.x; version 2.x introduced the Deflate algorithm, which is what's used today in gzip/zlib/PNG/etc.
      --
      * Q
      P.S. If you don't get this note, let me know and I'll write you another.
  15. Re:*blinks* and this appears on the front page.. w by weave · · Score: 3, Insightful
    Really... I also found it hilarious that the pages are loaded with shockwave ads and large 256 color gif files for simple border bits that could be done in 4 colors.

    Oh well, maybe I'll write an article about how to reduce size of GIF files using a smaller color pallete and turning off dithering so it can compress better... :-(

    This article needs to be shown to just about every web graphics shop out there, but not to us self-righteous nerds! :)

  16. Parent post a Troll? by NanoGator · · Score: 2

    I think he had a valid point. This article really does get filed under 'Duh'. There's a difference between having a negative opinion and trying to be offensive.

    Frankly, I agree with him.

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

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

  18. Re:Calling a cat a cat. by GigsVT · · Score: 2

    If only MIME wasn't a hopeless mess in Linux.

    --
    I've had enough abrasive sigs. Kittens are cute and fuzzy.
  19. 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.

  20. 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.
    1. Re:Choose your compression with care... by tjwhaynes · · Score: 2

      No no no! Thats not what I meant (mayb I'm tired too :-) )! JPEG compression of simple maps produces worse images and larger files than PNG. So choosing JPEG for a map is a worse decision than using PNG on all counts.

      Cheers,
      Toby Haynes

      --
      Anything I post is strictly my own thoughts and doesn't necessarily have anything to do with the opinions of IBM.
  21. 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.
    1. Re:JPEG is not appropriate for all images by benwaggoner · · Score: 2

      You can also get smaller file sizes with GIF and PNG for many kinds of content, even though they're lossless.

      I've had full 800x600 MacOS 9 screen shots compress down to 20K, losslessly, with PNG. JPEG even at Q=0 couldn't make a file that small, and it still looked gawdawful.

      While the distinction is often described as natural images versus synthetic images, 3D rendered stuff should be treated as natural images.

      The real issue is whether there are large areas of EXACTLY the same color, and sharp edges. In a typical screen shot, you might have several 100x100 blocks of exactly the same color. PNG and GIF do a wonderful job with those. They also do a great job with sharp edges, while the Discreet Cosine Transformation of JPEG causes a lot of artifacts with those, or requires a lot of bits to encode them accurately. So something simple as a black line on a white background is quite mathematically complex for JPEG to render.

      Overall, PNG will give slightly smaller files, and more importantly provides for more than 256 colors. I look forward to when it is ubiquitously supported by all browsers.

  22. Re:Calling a cat a cat. by Anonymous Coward · · Score: 3, Funny

    Yes, but using "JPG" instead of "JPEG" saves a byte of bandwidth.

  23. Re:More Interesting News by maggard · · Score: 3
    As the original subject (JEPG - a revolution!) is pretty much useless this at least is more interesting:
    More interesting, IMHO, is the fact that Photoshop is out for MacOS X. I'll be interested in what effect this has on the uptake of the OS, and whether it might ever lead to Photoshop on *NIX.
    Yes, I think this will increase the uptake in MacOS X. Lots of graphics folks have been holding out for this, apparently it's a great implementation and will indeed likely drive much of their marketplace (just think of all of the plug-ins that will need to be upgraded.) The spillover should be a shot in the arm for the whole Mac software market and increase pressure on everyone to make the switch.

    As to this increasing the odds of Photoshop on any other Unix - I doubt it. The MacOS X port is to the proprietary backwards-compatible-with-MacOS "Carbon" layer and not writing to the BSD side of things. Thus it's really the old MacOS Photoshop rewarmed and running mostly on a cleaned-up set of APIs. The other changes that have been made are apparently mostly for interaction with the Quartz graphics layer and Aqua UI, again Apple-proprietary.

    The next-gen evolution will likely be to MacOS X's Cocoa layer, yet again Apple proprietary. Thus unless someone ports Apple's Carbon library to another Unix or Apple decides to make Cocoa cross-platform along with support for a differing rendering layer we're unlikely to see any of this having any relevance to other Unix's. Of course they can all now talk seamlessly to Photoshop through scripting so they're not entirely out in the cold.

    --
    I don't read ACs: If a post isn't worth so much as a nom de plume to its author then I wont bother either.
  24. Re:Calling a cat a cat. by ImaLamer · · Score: 2

    It's quite a problem working on a XP/2000/9x machine which won't show me mpeg files when looking for mpg and the reverse.

    There is little need for extensions what so ever when you are working in a graphical environment. The GUI can assign icons to types [if someone hasn't already monopolized on that media type and got their icon on the 'top].

    In a console based environment there is also little need. Most users know what files are what and if they don't there is sometimes a color coding involved which helps you know what you can edit. [of course jpeg is little use to a console user].

    As far as I know linux has no problem reading the content headers of files but I'm not an expert, just a user. I assume this is done on the interface level, somone speak up!

  25. GIMP anyone? by Sean+Clifford · · Score: 2
    Uh, what about GIMP?

    Sure, PhotoShop is nice - if you're running a Mac or Microsoft Windows(TM) box and a grand laying around. Paint Shop Pro is pretty nice, does most of what PhotoShop does for a tenth the price - if you're suffering under a MS OS. But hey, you can download GIMP for FREE. Heck, they even have a Microsoft Windows(TM) port. Sure, you can't save GIFs or dick with TIFFs, nor can you do a lot of stuff you can do in PhotoShop.

    However, GIMP is great for most image manipulation needs.

    1. Re:GIMP anyone? by Sean+Clifford · · Score: 2

      Assuming you don't care about the patent issues, sure.

  26. Re:Calling a cat a cat. by Phroggy · · Score: 2

    It's unfortunate that the JPEG format ends up being described as the JPG, due to DOS naming constraints. Are we doom to see the usage of 3 name extension only in the future due to this lack of vision from the early implementers? I for one would tend to favor embedded MIME support and the removing of file extensions.

    Here here. I'm sick of hearing people talk about HTM files. Mention assembly language, and they reply "oh, you mean ASM?" Even Windows isn't this dumb anymore; why haven't the users gotten better?

    These morons are offensive to us Mac users, and they're polluting Linux too. Anyone have any suggestions for putting a stop to this?

    --
    $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
    $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
  27. Now if only... by ZoneGray · · Score: 3, Funny

    Now if only they could convince people to build pages that have fewer than 100 GETs, it might actually make a difference.

  28. 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.

  29. Re:Um, I thought this was common knowledge... by Ed+Avis · · Score: 2

    The biggest bandwidth saving on many sites would be to generate PNGs with an appropriate number of colours. Very often you can reduce your image to 8, or even 4 colours with very little loss of quality but a big reduction in image size.

    --
    -- Ed Avis ed@membled.com
  30. 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?
  31. 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
    1. Re:aol recompresses your jpegs by DrXym · · Score: 2
      AOL uses something called ART format and compresses and caches incoming images into that. I guess when you have 30 million users it saves a LOT of money, space and bandwidth to do this rather than fetch them from the net each time.


      I think AOL has a pref on the user side to disable this behaviour. You should search their site because they might have some way to disable it on the server as well, for example by inserting a meta tag or http header to data as its pushed out.

  32. Re:Calling a cat a cat. by Waffle+Iron · · Score: 2
    There is little need for extensions what so ever when you are working in a graphical environment. The GUI can assign icons to types

    Don't you just love it when you open a 1000-file directory and your hard drive grinds for 30 seconds while your file manager opens every last one of those files to peek inside? Then the GUI thread is bogged down while the icons are updated in real time.

    I'd rather just use extensions, thank you. (And the thee character limit helps keep things short and sweet.)

  33. Re:*blinks* and this appears on the front page.. w by ZoneGray · · Score: 2

    Hey, the RIAA seems to have people trolling Slashdot now, so articles on the basics are necessary.

  34. JPG Compression... by OrangeHairMan · · Score: 2, Informative

    http://www.spinwave.com/crunchers.html is a great free website that can compress your JPEGs (and GIFs)...I use it all the time for the images on my site.

    Orange

  35. Not a terribly informative article by Mwongozi · · Score: 2

    He doesn't appear to know a lot about what he's talking about. He calls a jpeg saved at 25% compression "25:1", where in fact the quality setting has direct relationship with file sizes.

    Here are some tips I've found over the years of putting together web sites:

    • There's no difference between saving at 95% quality and 100% quality, other than file size. It's pointless to make jpegs at >95% quality.
    • 75% quality is what I call "print quality", because it's the highest compression you can get away with on paper before people start saying "Eww, jpeg".
    • 50% quality is usually the smallest you can make jpegs for viewing on the web before people start noticing.
    • Use 5% or 10% quality for ultra-ultra small files, although they will look pretty terrible. Anything less than 5% quality is pretty much unusable.
  36. Re:Calling a cat a cat. by kenthorvath · · Score: 2

    Yeah, from now on I'm only downloading .MPEGLAYER3
    files to put in my music collection.

  37. 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...

    1. Re:interesting article... by libertynews · · Score: 2

      How about all 3? For some dumb reason I skimmed through the whole article, wondering where the meat was.

      Its a sad day when Slashdot starts posting trivial crap like this (not that the article per-se was crap, but it was written for a complete web-newbie).

      Anyone know of any geek sites with higher standards than Slashdot? I think its time to find a new place to get my nerd-news.

      Brian

      --
      Remember Lexington Green!
  38. JPG compressed? by ZaneMcAuley · · Score: 2

    Wasnt that originally the idea for Jpeg?

    --
    ----- Whats wrong with this picture? http://www.revoh.org:1234/whatswrong
  39. 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
    1. Re:A better title for this... by sharkey · · Score: 2

      Because the editors can't remeber what stories they posted an hour ago, and repost them. How can you expect them to recognize that something is, has been, and will be obvious for the forseeable future?

      --

      --
      "Outlook not so good." That magic 8-ball knows everything! I'll ask about Exchange Server next.
  40. 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.
  41. just nuke the trash in the .jpg file by coyote-san · · Score: 3, Informative

    If you want to save bandwidth, just nuke the trash various image editing tools leave in the .jpg file. (E.g., use jpegtrans(1))

    Maybe you want to keep thumbnails in images on your development system, but all they do is burn bandwidth on the production system. You can usually reduce the size by a significant amount, even if you decide to add your own copyright messages, etc.

    --
    For every complex problem there is an answer that is clear, simple, and wrong. -- H L Mencken
  42. Re:Um, I thought this was common knowledge... by ergo98 · · Score: 3, Informative

    This points out that choosing the proper compression format is not common knowledge, and there are still loads of people who confuse one over the other.

    JPEG is not better than GIF/PNG, but rather it's for a different purpose: As others have pointed out (hence I'm being redundant), JPEG is for photo-realistic images with lots of smooth gradiants and subtle tone changes. JPEG is lossy, meaning that if you did a perpetual cycle of compression/decompression you continually degrade the image. GIF/PNG is not lossy, and the decompressed image is exactly the same as the original (like LZWing the file), and it is useful where you want precise images (such as icons, banners, graphical text, etc.). GIF can actually compress comic type images to a much greater degree than JPEG can (and, because it's lossless, you don't get the artifacts of JPEGs).

  43. Re:Calling a cat a cat. by Waffle+Iron · · Score: 2
    Yeah, what a fucking genious idea. There NO possible way a file extension could be wrong. Hell no. That's fucking street savvy shit. Do you code? With logic and wit like that, you'd be a fine ass motherfucker.

    We're talking about GUI icons here, Einstein. They're just hints for the user. Any non-broken program would check the actual file format before operating on a file. (Yes, I realize that a certain large OS company has written broken programs that assume the extension==file format. That's their problem.)

  44. Who wants to bet Mr. Tweak is Hemos' pal? by Blaede · · Score: 2, Funny

    Mr. Tweak "submitting" a story about his own site, and Hemos going "yeah, now this is TECH!!!!!!!!!!"? Or is Tweaktown allied with /. in some way? No one reads this site anymore for the info, the reader comments are the most entertaining now. /. has become a joke regarding tech news.

  45. Re:*blinks* and this appears on the front page.. w by 56ker · · Score: 2

    If you do why not submit it to Web Monkey?

  46. What's JPG compression? by autopr0n · · Score: 2

    Did you mean JPEG?

    I once had a die-hard mac user tell me that "JPEG" pictures evolved on the mac, because they had a four letter name, and type and creator info on mac files was four letters long. Nevermind that it was named after the Joint Photographic Experts Group...

    --
    autopr0n is like, down and stuff.
  47. NEXT ON SLASHDOT by cygnus · · Score: 4, Funny

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

    --
    Just raise the taxes on crack.
  48. Re:Nobody here seems to mention the DjVu format... by maggard · · Score: 2
    I thought this has become common knowledge, but there's a bitmap compression format called DjVu invented at the AT&T Labs in 1998 which has significant advantages over the currently popular formats (JPEG, PDF, etc.).
    Darling, there are literally hundreds of alternative image compression routines. Even discounting the really oddball ones there are still over 20 well known ones vith general appliciability (btw PDF is a file format; while it can contain objects compressed using a number of well recognized formats it isn't one itself.).
    They advocate that their format is best suited for scanned documents.
    Right, because DjVu attempts to differentiate an image foreground from the background and compress them differently. This is useful for situations where there is a high-contrast between a foreground and a background (assuming such can be identified), one is primarily interested in one layer over the other, and there's no problem with using an oddball format with only one implementation that has apparently been left to languish.

    While these constraints aren't an issue for folks attempting to document illuminated manuscripts and other like materials they are very much a problem for folks on the World Wide Web. Unless you're going to insist on sending hapless browsers to an English-only website for an obscure plugin that few servers even have MIME-mapping for anyway, insist they install this plugin to their browser & OS assuming they're even supported ( oh wait - the website is now dead! ) then come back to browse a website, well good luck.

    In the meantime the rest of us will lumber along using more general-applicability formats already widely supported by tools and browsers such as GIF, JPEG, increasingly PNG and somewhat TIFF. Let us know when you read another technology-of-the-future article from '98 though! Hey, check out IFF, another where-is-it-now (for good reason.)

    --
    I don't read ACs: If a post isn't worth so much as a nom de plume to its author then I wont bother either.
  49. 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
  50. How does the JPEG group make money? by zapfie · · Score: 2

    How does the JPEG group make their money? Do they enforce a MP3-style licencing scheme, or is it a group effort of companies and organizations who would mutually benefit?

    --
    slashdot!=valid HTML
  51. Re:More Interesting News by Ryu2 · · Score: 2

    Also, there was a Solaris version as well.

    --
    There's 10 types of people in this world, those who understand binary and those who don't.
  52. Image Compression by the+eric+conspiracy · · Score: 2

    Be careful - this sort of article might lead to designers replacing text with .jpg images of the text.

    DAMN! TOO LATE!

  53. Re:Um, I thought this was common knowledge... by mgv · · Score: 2

    Yes, I thought it was common knowledge also. But I've noticed that there seems to be very little decrease in the use of GIF files in web sites

    Well, for your information, certain programs (Front page extensions to be precise) rely on you using either gif or bmp for the backdrops on their automatically generated navigation icons and theme elements. Well, frontpage 2000 did, cant speak for 2002 extensions.

    This makes alot of sense relative to JPG, but isn't as good as PNG, which seems to code the icons in about half the space.

    You can still use any file format for the main body of your site, its just a failing (one of many) in the server extensions to generate icons on the fly.

    My 2c worth,

    Michael

    --
    There is no cryptographic solution to the problem where the intended receiver and the attacker are the same entity.
  54. oh oh, me too! by twitter · · Score: 2
    Yeah, the bit about needing a plug in for every one of the three pages they needlessly choped this article into was annoying. Three clicks of the cancel for x shockwave flash pluggin for one crummy article, it took almost as long to click as to read.

    Oh yeah, no mention was made of Portable Net Graphics (PNG) file format and it's lossless compression, or any of the fine free software that utilizes it, GIMP, Electric Eyes, etc.

    --

    Friends don't help friends install M$ junk.

  55. Re:More Interesting News by hackerhue · · Score: 2
    The next-gen evolution will likely be to MacOS X's Cocoa layer, yet again Apple proprietary.

    If they port it to the Cocoa layer, it may be compatible with GNUStep.
    --

    To get something done, a committee should consist of no more than three persons, two of them absent.

  56. Re:Evil by Graspee_Leemoor · · Score: 2

    Yes, you're right- we live in a compressed age. Our digital TV is compressed, our movies are compressed, our music is compressed, our images are compressed.

    Where we used to get uncompresssed we now get compressed because although the quality is worse, we can fit more stuff on whatever medium comes on.

    I was just starting to really get pissed off about the world we live in, and then I discovered that Opera (which I only started using yesterday after using Mozilla for a while) hides the mouse pointer while you are typing- at last! Sanity! No more elbowing the mouse out of the way while typing in usernames on websites! Hoorah!

    graspee

  57. Hey its 4/20 by gad_zuki! · · Score: 3, Funny

    *Hemos and buds in a smoke filled room*

    "Dude, this image is only 20 fucking kilobytes big."

    "Whoa."

    "Damn."

    "You just blew my mind."

    "POST IT!"

  58. Really, get with it! by Ziviyr · · Score: 2

    All these uncompressed TIFFs are making my web browsing a really slow experience.

    --

    Someone set us up the bomb, so shine we are!
  59. Transparent PNGs in IE by yerricde · · Score: 2

    Iexplore still can't render any PNG image with the least bit of transparent decency.

    IE 6 on my machine handles indexed PNG images that use binary (not alpha) transparency just fine. This means that it will properly handle almost all PNGs converted from GIF, as GIF supports only binary transparency and only 255 colors per frame. (IE will not be able to handle PNGs converted from transparent high-color GIF images, that is, GIF images that use multiple frames, each with their own palettes, to draw 4,096 colors.)

    You're right that IE 6 will screw up any other transparent PNG image though. But why, on a web site with a solid-color background, do you really need a transparent image? Yes, I know about the "PNG on top of JPEG" hack for site logos, but that typically uses an indexed PNG, putting any drop shadow or halo in the JPEG.

    --
    Will I retire or break 10K?
  60. i understand now by discogravy · · Score: 2

    at first i wondered why this was posted to slashdot, but I slowly came to the realisation that this is a subtle bid to get rid of the recently added advertisements to slashdot.

  61. er... by Sj0 · · Score: 2

    Why bother with inconveniencing web authors in any way(though I'll admit that using JPGs is hardly a huge inconvenience when most already use it) when you can just install mod_gzip on the web server, and use anything from a 8 bit GIF to a 24 bit BMP(sans compression at the file level) and get relatively good compression regardless?

    --
    It's been a long time.
  62. GIFs aren't lossless.... by TheOnlyCoolTim · · Score: 2

    GIFs have only 256 colors.

    While you can offset this somewhat by using a selective pallette, most of the time it is still noticeable.

    Tim

    --
    Omnia vestra castrorum habetur nobis.
  63. Re:Calling a cat a cat. by GigsVT · · Score: 2

    That's a cop out. If you narrow "Linux" down to just the kernel, it's technically correct, but it allows you to ignore all the application space problems. That isn't productive.

    When I said "Linux", I meant "common Linux distributions". MIME has no meaning in the context of the kernel.

    --
    I've had enough abrasive sigs. Kittens are cute and fuzzy.
  64. Re:Calling a cat a cat. by ncc74656 · · Score: 2
    What if your file manager could sort files by type by looking at their "actual" type?

    ...and where would you propose storing this metadata? The vast majority of filesystems out there make no provision for any differentiation beyond whether a directory entry belongs to a file or a subdirectory. Some also know about file links, device "files," and such...but for differentiating the different kinds of data that might be in regular files, the only filesystems I know of that do that are the different filesystems Apple has come up with over the years (HFS, ProDOS, etc.). FAT*, NTFS, ext*, reiserfs, XFS, etc. don't allow for a way to tag a directory entry to say that it points to a JPEG image, an MP3, or whatever. To identify the file, you either use a few characters in the filename (.jpg) or you search for magic bytes in the file (0xFF 0xD8 0xFF 0xE0 0x00 0x10 'JFIF'). Which of these two methods is more efficient for the computer to carry out for a large number of files is an exercise left to the reader.

    --
    20 January 2017: the End of an Error.
  65. Re:Calling a cat a cat. by ImaLamer · · Score: 2

    You are such a tool.

    I don't mean thumbnails - and there is no need to 'peek' inside each file. The content is known just as fast as the file name.

    Also, there is no "three character limit". For years I've been working in different MPEG-1 and MPEG-2 applications which will only save to four characters.

    Good idea to rely on those letters which anyone could/can/will/does change.

  66. Bandwidth conservation society by 4444444 · · Score: 3, Informative

    any webmaster that hasn't checked out the bandwidth conservation society should be slapped

    --

    http://Lenny.com
    4 great justice!