When you say you would like to make the PNG smaller, it's a little unclear exactly what you're asking.
Do you want to change its *dimensions*?
Or do you want to reduce its *file size*?
If you want to change its dimensions, then virtually any graphics editing software will work. Some open source and free ones that would work are: Paint.net (Windows only), Seashore (Mac only), or Krita (any platform).
If it's the *file size* you want to reduce, then any of the above software will still help. But first, a brief primer on graphics formats. Getting a well-compressed image depends on a number of factors:
1) What kind of image data it contains. Photo? Line drawing? Logo? Something else?
2) Where you intend to use it. On the web? For print? On a T-shirt?
3) Whether you are willing to accept lossy compression, and if so how much.
PNG offers "lossless" compression. That is, you put pixels in, and you always get the exact same pixels back out. It supports transparent pixels (including fully and partially transparent pixels), which are helpful for blending smoothly over a background, such as in a web page. It excels at compressing large areas of solid color, such as you might find in a logo, a bar chart or a diagram. On the down side, it is poor at compressing photographs, which have many thousands of fine gradations in color.
JPG offers "lossy" compression. That is, you put pixels in, but it discards some of them and blends them into larger blocks of vaguely similar color. It can get away with this by relying on the human brain's propensity to "smooth out" visuals. In essence, it dumps a bunch of pixels and relies on your brain to infer what was supposed to be there. A proper graphics editor will let you specify a target compression value when you save in JPG, ranging from 100 (no compression) to 0 (dear god, what is that thing). A value of 95 is very high quality. I often save at 85 or even 75 with no particularly noticeable degradation in image quality. If you push it too far you wind up with an unrecognizable mess. JPGs excel at compressing photographs. But they suck at large areas of solid color, such as logos, bar charts or diagrams. JPG also struggles with line drawings. Finally, JPGs do not support transparency of any kind: every pixel will be fully opaque.
WEBP is a somewhat newer format that is finally gaining broader acceptance. It offers a mix of lossy and lossless compression, and lets you choose between these. It tends to yield considerably smaller file sizes than both PNG and JPG. It has full support for transparency, including partial transparency. The main downside of WebP is that you sometimes encounter software that won't support it even though it could. For example, there's a web forum where I often post images; the forum software does not support uploads in WebP, even though all the major web browsers can display them just fine.
TIFF is venerable, but still the gold standard for archival storage of image data because it allows very high resolutions, uses lossless compression (or no compression at all). The other main selling point for archival TIFF data is that it's not dependent on the whim of any one company -- the entire specification for how the file format work is open, available royalty free to anyone who would like to implement it. That means we can archive the file format data alongside the files, and new TIFF interpreters can be written any time we need one.
Those are the big three for web purposes. There are other graphics file formats for more specialized purposes. SVG for vector graphics, for instance, but that doesn't sound germane to your question.
Hope this helps.
Will Martin
Head of Digital Initiatives, Systems and Services
Chester Fritz Library
University of North Dakota
he/his/him
701.777.4638
-----Original Message-----
From: Code for Libraries <[log in to unmask]> On Behalf Of charles meyer
Sent: Friday, May 5, 2023 11:21 AM
To: [log in to unmask]
Subject: [CODE4LIB] Graphics - modifying
My esteemed lisstmates,
I have a PNG file. In that I have a design which I'd like to make smaller so I can fit more graphic images on the page.
I don't have Photoshop, Adobe Creative Suite or that kind of advanced software.
Has anyone reduced the size of a grpahc in a PNG using free software?
MS Publisher? MS Paint? Paint.net? 3D Paint? Canva? GIMP? Irfanview?
Thank you so much.
Charles.
Charlotte County Public Library
|