bsmall2 Learning Racket

ResizeJpgs

Before posting pictures to Diaspora*, pixelfed, or writefreely I often select the worthwhile parts in Gimp. After selecting the worthwile part of a pictures, if the part is still larger than 700 pixels (for Diaspora*) or 1400 pixels (for pixelfed) I try to re-size the snippet before uploading. Re-sizing seems like a decent, or “ethical”, thing to do. I haven't been able to donate to some of the servers that make my free SNS accounts possible, and I hope to avoid burdening any viewers. Resizing before uploading lessens burdens on servers and devices (I imagine). Besides the general ethical reasons, some servers have volume limits, so keeping image sizes down should let me share more photos before approaching my limits.

I re-size the image in Gimp before exporting the photo to an “edited” folder. The photo manager shotwell organizes photos in year/month/day directories. So one day a program could go through the directories created by Shotwell, find all the edited pictures, and organize them in a useful way. In the meantime, I just want save a step in Gimp. With this Racket script I can just save selections to the “edited” directoy without the extra step of resizing the image canvas. It will save time to avoid working with menus…

DrRacket Screenshot: Resize jpg files script

This time I got the script working in DrRacket first, then made an executable script in Emacs…

Read more...