Testing a posting method, with a Pretty Floppy
OKAY so if I copy-paste out of my image editor, like this, I get a PNG.
(better than a BMP, at least, and it makes sense for screenshots)
but if I copy a jpeg file in explorer, it pastes as a jpeg.
so here's my idea: I write a little script that yanks the PNG out of the clipboard, saves it as a JPEG to a temp folder, then copies that jpeg file. So instead of directly posting out of my image editor, I do copy, click the script icon, then paste.
that'd be only a minor change to my workflow, it'd fix the PNG problem, and it wouldn't be too hard to write, I don't think.
basically I'm trying to avoid the problem of posting giant PNGs when they'd be better served as a small JPEG. Twitter doesn't care what you post, it will JPEG them if it feels like it, and I have been unintentionally depending on that functionality
basically my workflow is this:
I take a bunch of pictures with my phone, then they get autosynced to my desktop.
on the desktop, I go into my camera folder and drag them all into my image editor. I rotate them as needed, then select the rectangle I want to post, and copy it. I then paste it into twitter/mastodon/whatever.
this technically still works on mastodon, but results in giant PNGs being uploaded, which load slowly and waste space on the server.

@foone doesn't PNG support similar compression like JPEG does? Maybe it just needs to be tickled that way / resized?

Asking since I *think* PNG is supposed to be a newer and better format, but I very well may be mistaken.

@viq no, the compression is completely different, both in effect and idea

The compression in PNG is lossless, like a ZIP (in fact, it uses the same compression algorithm as ZIP files, DEFLATE). You always get the same pixels out that you put in. Downside: you generally can't compress *too* much, and it doesn't really work for photographs, because even you have a picture of a white wall, it's not all the exact same white everywhere, unlike in digital drawings

@viq JPEG, on the other hand, is lossy. By creating a JPEG, you lose information you can't get back

The compression is complex-ish, based on the direct cosine transform, which works similar to a fourier transform, i.e. it analyzes the frequency components and then throws away subtle changes in the pixels you're not likely to notice

Work great for photos, because, like I said, in the natural world, white isn't pure #000000

@viq discrete cosine transform*, narf