3 ms·
For even bigger bandwidth savings paint a solid color over the non-visible portion of the jpg. There's no need to transmit all that image data if you aren't goi
by mthoms 16y ago
For even bigger bandwidth savings paint a solid color over the non-visible portion of the jpg. There's no need to transmit all that image data if you aren't going to show it.
For this example I was able to quickly trim the jpg size from 35k to ~24k in about 60 seconds using Photoshop.
- ars 16y agoSince JPEG is lossy just by adjusting the quality level you can save JPEG in any size. So your test doesn't tell us anything - maybe you just used a lower quality level. (Although I agree with the basic premise, post editing the image isn't such a good idea. Instead use a lossless jpeg editor that can selectively cut out portions of the jpeg.)
- masklinn 16y ago> Since JPEG is lossy just by adjusting the quality level you can save JPEG in any size. And get a blocky crapbucket as a result. By making unused/un-displayed sections of the JPEG (or PNG or whatever) file easier to compress (which still requires some basic insight as to how the file's compression is performed), you lower the file's size at constant perceived quality. That would be the point.
- jjcm 16y agoI think what he's saying is that the original parent might not know what the quality setting was that they were using in the post, and as such the quality setting may very well differ. This would lead to varying file sizes despite the presence of the blanked area.
- mthoms 16y agoI think we can agree that my 60 second test wasn't very scientific (nor was it meant to be), but I'm confident that the result is still typical of the type of savings you'd see using a more controlled process. Since we're nitpicking, I might as well point out that you can't "cut out" portions of a jpeg either.
- ars 16y agoActually you can. See the jpegtran command - it works losslessly on the DCT. If you do want to cut out the alpha region, do not trim right up to the image. Instead trim only in 16 pixel blocks. By having a sharp edge inside a macroblock you increase the storage requirements. No one has written it currently as far as I know, but it's also possible to selectively remove/replace 16x16 pixel blocks inside the jpeg losslessly.