[Lowfer] Hints for Compressing Graphic Files
J D
listread at lwca.org
Sun Nov 12 18:19:36 EST 2023
Some of you may remember my posting some rather large seeming chunks of
Argo captures in the past...even, one time, an enlarged view of another
member's earlier attachment in a more readable image size and yet with
25 or 30% lower file size. Here are some quick tips on how to do that
sort of thing. A couple may seem counter-intuitive at first, but there
are good reasons for them.
First and foremost, DON'T let Argo save .jpg images! If you need to keep
capture sizes to a minimum on your hard drive or other storage device,
use GIF instead. Reason: GIF may limit color rendition to a 256-color
palette, but it is lossless so far as detail resolution is concerned.
JPEG images substitute patterns of pixels that minimize the amount of
data needed to fool the eye into seeing something similar to the
original lines and edges in the image. But that's a one-time-only
benefit! If you edit and save a .jpg file again, those blocks of pixels
get treated as a whole new pattern by the algorithm, which actually
_increases_ file size with each generation, even as the lines and edges
themselves grow fuzzier.
Therefore, start with as clean and uncompressed image as you can. Get it
into .bmp form ASAP and keep it that way through ALL stages of editing,
right up to the very end. I use plain old MS Paint for this.
If you have to add to add explanatory text or labels, try to avoid serif
or decorative fonts...needless added detail compared to sans-serif.
Labeling on a solid black or solid white background entails fewer
pixel-to-pixel transitions than typing onto the noise background of a
waterfall display, too, so the final compression can be slightly tighter.
Judiciously crop and trim to include just the essential information you
truly need in order to tell the story. This even includes the frequency
scale. Do you really need every digit of every label down to the nearest
half Hz (185,300.0, 185,300.5, 185,301.0 etc), or could you trim out the
kHz and some or all of the remaining half-Hz labels (300, 301, 302 etc)
and still convey enough? (Unless you need long time ticks for
measurement purposes, consider using short ticks to eliminate a bit of
extra detail from the original image, too.)
Like Gedas, I also selectively apply a bit of blur (easy to do in
Irfanview) to redundant noise portions of the image in order to reduce
the degree of detail that has to be compressed at the very end. That's
only after I've gotten rid of everything else that I don't need in the
picture.
If humanly possible, I try to avoid having to shrink the resulting image
at all. It definitely makes things harder to read, but rather
surprisingly, it also does NOT shrink the file size by a corresponding
amount! This is because the resizing process creates pixel-level
artifacts, which themselves amount to data that has to be accounted for
during compression.
Very last step: Once I have a clean, artifact-free, trimmed original
bitmap image in pristine form, then and only then do I save it to a JPEG
file with Irfanview. If I start with a nice clean image that has been
saved as a bitmap all the way through to this point, then I can compress
the living heck out of it before it starts to look grungy!
I start with as high a quality factor as I think I can get away with in
the Save (original folder) dialog box of Irfanview, or Save As in some
other programs. Without closing Irfanview, I check the resulting .jpg in
File Manager. If it's over about 32 kB, I immediately return to the Save
dialog and select a lower quality factor, and save over the first .jpg.
If necessary, I repeat until I get under 32 kB.
In Irfanview's scheme of things, 70 is considered average compression
for a JPEG. Starting with a good enough image, I can go as low as 40
without raising an eyebrow, 25 with some noticeable degradation, and
have rarely used 15 before significant loss of quality.
Never, ever attempt to further compress the saved .jpg image. Always
reopen the archived .bmp and do it from there, if necessary
Just some hints that may prove helpful here on the reflector.
John D.
More information about the Lowfer
mailing list