Forums > Off Topic > Compressing screenshots (no practical questions)

user avatar

Nowhere Girl (8680) on 9/27/2016 9:04 AM · edited · Permalink · Report

Cursed be my cousin for having introduced me to D-Fend Reloaded, which sparked my screenshot-collecting mania. ;)
A technical detail: I start three kinds of games through D-Fend Reloaded: DOS games, Scumm VM games and Windows games which don't need any emulator, but can be started through D-Fend Reloaded as well. I keep all screenshots in PNG format, which doesn't alter colors (unlike JPG), but is usually much smaller than bitmaps. (Note that I know such formats exist, I don't know what is the difference between them.) I play mostly retro(-styled) games, most commonly in 320x200 or 320x240 resolution, but in order to be more visible, thay are always displayed in 2x scale - each pixel becomes a tiny 2x2 pixel square. And just today I noticed that while D-Fend Reloaded automatically compresses these screenshots to their true resolution (turns each such square back to 1 pixel), Scumm VM and Irfan View (which I use for collecting screenshots from Windows-based games) don't. So I started compressing screenshots - all which are really in 2x scale and don't contain any parts drawn with a "single-pixel line" (example of a game which does contain such parts now and then and so won't be compressed: "Heroine's Quest"). Manually, in Paint (I hate the new "ribbons" Paint, can't use it, can't understand it, so I use Paint XP for Windows 7) - I stretch it to 50% and resize the picture. It's stupid, but also curious in a way, so I'll keep doing it this way.
Anyway, now come the impractical questions. Let's divide games loosely in two categories - older games such as the Indiana Jones series (played through Scumm VM) and newer games with more sophisticated graphics, such as the Blackwell series. The former have definitely smaller screenshots in terms of file size. Compressing them as described usually makes them about 40% smaller in terms of file size. And I can't understand what happens with screenshots from newer games, ones which are usually 100-200 KB big. Some compress nicely, several tens of KB. Some lose only a few KB. How is that possible???
This question has no practical value whatsoever, but when I stumble upon such illogical things, I can't give up wondering about them.

user avatar

Cavalary (11448) on 9/27/2016 11:54 AM · Permalink · Report

You can use IrfanView to resize, keep it simpler. However, do note that a screenshot first scaled to 200% and then to 50% may not always be exactly the original, depending on how scaling is treated by the program. No idea how D-Fend works.

The difference between those formats is that BMP is basically the raw image data, each pixel has its own bits (2-32 depending on color depth), so basically file size = resolution x bit depth / 8.
PNG is lossless compression, outputs the exact same image as the BMP but compresses what it can, where the same color covers a larger area or such. There are many things the format can do and programs tend to just try some of them, so there are usually PNG compression levels to choose from, all outputting the same image visually but higher being slower, as it tries more things to lower the file size. Typical image manipulation software doesn't try nearly everything though, so PNGs can be shrunk a fair bit more with specialized software I hear, not that I ever tried it.
JPG is lossy compression, so it tries to compress the image to a certain target, you usually have a quality slider there, but can also try to target a specific size, depending on the program you use. As you said, the output is different from the original as it also compresses parts of the image that are simply similar enough, not absolutely identical, and the lower the quality (or size) you ask of it, the more it lumps together and the worse the image looks. Note that even at 100% quality JPG will alter the image, especially noticeable if image contains text or narrow (1-2 pixel) features. Really not recommended for small images.

As for why some compress more and some less, depends on what's on the image, how many different colors, how many different areas, shapes...

user avatar

Virgil (8563) on 9/27/2016 12:44 PM · Permalink · Report

DosBox doesn't compress the screenshots - it just captures them without any filters or enhancements that you set up. If you want to capture the end result - I guess you should use an external utility to just take snapshots from DosBox window. Programs like Fraps, Bandicam, the free ones that come included with graphics driver or something else.

By the way, why do you use Paint to resize it (or for anything else for that matter)? IrfanView or Xnview (I prefer this one) both has tuneable resize functions.

user avatar

Nowhere Girl (8680) on 10/2/2016 6:42 PM · edited · Permalink · Report

I use Paint (Paint XP for later versions of Windows) because it's the most simple. For me Irfan View is just for screenshot capture. I also have some other graphics program, but I never remember its name... Anyway, it's more like a simplified Photoshop and I, a non-expert, have used it several times to make very amateur nice graphics or to create some strange effects with photos. For example it can be used to make a negative image, including partial negative - so that, of the RGB colors, some are reversed and some are not. For example I created a photo in shades of poisonous, almost fluorescent green and pink this way. I never made a lot of photos, but a hobby of mine is climbing ski jumping hills and I've altered a small percentage of the photos from my journeys to have strange effects*.
Btw, as for screenshots again: why is the image OK when I perform the simple procedure Select all --> Stretch/skew (stretching to 50%) --> Attributes (downscale to remove the white border around the stretched part), but when I stretch the image without selecting it (this way its attributes are also changed autmatically), the colors get distorted?

*Btw, a 100% offtopic. I have some slides from my childhood - early 80s, for example photos from summer holidays at the Baltic seaside... Something I especially like at those slides is that they are strangely dark... There's just something mysterious about it. I realise it's just the camera's fault, but what frustrates me is that I'm completely unable to reproduce this effect by playing with settings when digitally altering an image. (I'm sure it's possible, but as I said - I'm no expert.) Not very dark, one can still see what's in the slides (especially if they're shown on screen, but my projector has long been kaputt), but it's some brownish darkness. It kinda completely non-negatively creeps into my memories, these strange colors are a part of my experience of that time which can never be described by simple categories such as "sentimental" (but this is my point anyway: that there are no such things as "emotions", "thoughts", "perception", "memory" and so on if seen as separate phenomena, Experience is a continuum). So, back to more prosaic topics, I tried to achieve the same effect through digital manipulation of my photos from ski jumping hills, to connect them symbolically to those earlier memories - but I just don't know how to achieve this "brownish dark" effect... I won't send any images, I wouldn't know how to scan a slide.