Basically I'm trying to adapt my Twitter workflow to mastodon. I take picture with my cellphone, it's automatically synced to my desktop, I drag those images into my image editor and rotate/adjust as needed, then select the area I want to post and hit COPY, then paste that into the Twitter client.
This avoids having to save a file for the cropped version, and having to then find that file again to post it.
No file also means I don't have to clean up those files or have it clutter up my hard drive forever.
And I don't save the edit, so my synced camera photos folder remains the original image, in case I need to crop it differently later.
Unfortunately the copying of a partial image, on windows (and I believe Linux too, but haven't tested recently), ends up as some kind of bitmap (possibly a literal BMP), so when I go to paste it, the browser/mastodon has no idea that this shouldn't be a lossless PNG, and unlike Twitter mastodon doesn't enforce converting huge PNGs to JPEG, so I end up posting what could be a 100k jpeg as a 2mb PNG instead
@Foone Looks like this is the (client-side) part of the code you'd want to edit: https://github.com/mastodon/mastodon/blob/63002cde03a836b4510aca5da564504ecaedb5e9/app/javascript/mastodon/actions/compose.js#L252
resizeImage takes an optional "type" parameter which defaults to PNG: https://github.com/mastodon/mastodon/blob/379a7a7ca7cf913cbc130a6323f821b534fc14c4/app/javascript/mastodon/utils/resize_image.js#L155