BugmenotEncore
12/12/23 11:46PM
A case for double checking the image compression
Hello everyone. Having had a eye-opening moment during a recent upload, I thought I should talk to you about lossless compression for a minute. Try your best to stay awake.

Artists and compression enthusiasts are not groups who overlap much. This isn't always a problem. Then there's stuff like #189200, where a combination of atrocious compression and a superfluous alpha layer can leave the source image about 40% bigger than it has to be.

This is a problem for two reasons, the obvious one being bandwidth. Now, I'm sitting on a broadband connection and a 4G network, I have it pretty easy, chances are people reading this do too. Not everyone is that lucky. Try loading an absurdres at the edge of your phone tower's range. You'll see how people in the dumps and Verizon customers have it.
We upload images here to share them with others, it's worth to put in a few minutes to keep the site accessible to the less fortunate.

The other issue that us on the user end can forget about is the server costs. A single image being twice as big as it could be is not a big deal, but hhub hosts a Lot of images. It adds up. And porn adverts aren't worth much.

The actual pricing cutoffs for storage are at hundreds of thousands of images each, probably. The site won't disappear tomorrow if we don't all start squishing the image sizes. But it's healthy in the long term.

For these reasons, I ask artists to please familiarize themselves with the compression settings of whatever editors they are using.

And for the rest of us, consider running your images through some lossless compression before uploading.

Jpegoptim and pngout work great for people who don't wanna think about the details, since you can drag and drop images into the executable, they will try to pick the best settings for you. Pngout's free version only lets you drop in one image at a time, but it detects unused alpha layers and other bloat, which is convenient. It's also extremely aggressive, sometimes running through multi-minute steps just to shave off fractions of a byte. I like this because compressing things to make them smol gives me unabashed happiness, but your mileage may vary - other options exist. Just make sure your choice is *lossless*, to keep the image quality intact.

For .gifs, I've had some success with gifsicle, though you need the command line and fiddling with the options to make that one work, and it's a lot less reliable than the other two. I myself am open to suggestions there, I'd like a better interface if nothing else.

For those I've swayed to this mildly noble cause, can find all the above here(Windows versions, with manuals):

mega.nz/file/IpxhGIaT#nWw...P6tmvaekg_1r_8sivRxQpD2hE
Hypnorgasm
12/13/23 08:50AM
As someone who doesn't have much experience with image files or drawing, I don't have much reference about reasonable file sizes. Can someone more experienced than me give an approximate file size (for a typical one-panel image that doesn't have small text) at which I should start considering doing this before uploading?
For example, post #188916: if I were looking at uploading that, should I try one of these compression methods if the original file is 1 MB? 5 MB? 10 MB?

I'd rather not do this with every image (especially if it only saves a small amount), but if it can take a significant chunk out of the file size without affecting the image, I'm quite happy to keep an eye out.
Mindwipe
12/13/23 09:03AM
I believe in uploading the original image exactly as the artist made it, unless it breaks somehow. I've only had to optimize or downscale a couple video files. One file refused to play until I lowered its resolution, and another had a bitrate so high in its original form that it wouldn't load on the site. I don't think image files will cause any problems, regardless of how unoptimized they are.
BugmenotEncore
12/13/23 10:19AM
Hypnorgasm said:

I'd rather not do this with every image (especially if it only saves a small amount), but if it can take a significant chunk out of the file size without affecting the image, I'm quite happy to keep an eye out.

<3

Can someone more experienced than me give an approximate file size (for a typical one-panel image that doesn't have small text) at which I should start considering doing this before uploading?
For example, post #188916: if I were looking at uploading that, should I try one of these compression methods if the original file is 1 MB? 5 MB? 10 MB?

I'm glad to lend a hand!
And chose a great image as an example! That 2 MBs looked real sus to me at that resolution, and wouldn't you know it? It also has an alpha layer for no reason.

Since you don't want to bother with small gains, if the highest quality image you can find is a jpeg, you can pass on compressing it unless the resolution is absolutely ginormous. It's already a highly compressed, lossy format, you won't get much out of doing it.

For .pngs, if you could comfortably fit the image multiple times onto your screen in both directions, it should usually be below 1 MB. If it only fits your screen once, or just about, like your example, it should be below 2 MB. Anything bigger is a sign that the artist didn't bother with the settings and saved through a shortcut.

File size steadily climbs up from there to the 5 MB range until you hit absurdres, following that same pattern.

5 MB+ for absurdres images is reasonable, but I'd run them through anyway, since even decently compressed ones will be large. You'll still save people with poor connections a lot of time by shaving off what you can.

Mindwipe said:
I believe in uploading the original image exactly as the artist made it, unless it breaks somehow. I've only had to optimize or downscale a couple video files. One file refused to play until I lowered its resolution, and another had a bitrate so high in its original form that it wouldn't load on the site. I don't think image files will cause any problems, regardless of how unoptimized they are.


I would sure hope a site meant for hosting images can host images without breaking! The opposite would be very strange.

But, more seriously. Whether the site can handle the content or not is an important priority. Just not the same as this one.
Hypnorgasm
12/14/23 07:32AM
I appreciate the guidelines! I'll keep an eye out on future uploads.
Hypnorgasm
02/12/24 09:57AM
Update on this: I've been using PNGout on the default settings, and it usually takes a fair amount off the file sizes. For example, it brought post #195604 from 8.75 Mb to 7.34 Mb. And on a smaller picture, post #195607, from 3.12 Mb to 2.47 Mb. And even smaller, post #195477, from 533 Kb to 487 Kb. On the latter two, it only took a few minutes, but the first one took more like 10-15 minutes.
Hopefully that's helpful information for other people considering this.
1


Reply | Forum Index