Making image parts transparent in Python

As part of my year-long StillStanding project, I post an average image of the spherical video recordings on Mastodon daily. Average images The average image is similar to an “open shutter” technique in photography; it overlays all the frames in a video. The result is an image that shows the most prominent parts of the video recording. This is ideal for my StillStanding recordings, because the technique effectively “removes” objects that appear in the recording for a short period of time....

August 7, 2023 · 2 min · 377 words · ARJ

Optimizing JPEG files

I have previously written about how to resize all the images in a folder. That script was based on lossy compression of the files. However, there are also tools for optimizing image files losslessly. One approach is to use the.jpgoptim](https://github.com/tjko.jpgoptim) function available on ubuntu. Here is an excellent explanation of how it works. Lossless optimization As part of moving my blog to Hugo, I took the opportunity to optimize all the images in all my image folders....

December 9, 2022 · 1 min · 168 words · ARJ

Programmatically resizing a folder of images

This is a note to self about how to programmatically resize and crop many images using ImageMagick. It all started with a folder full of photos with different pixel sizes and ratios. That is because they had been captured with various cameras and had also been manually cropped. This could be verified by running this command to print their pixel sizes: identify -format "%wx%h\n" *.JPG Fortunately, all the images had a reasonably large pixel count, so I decided to go for a 5MP pixel count (2560x1920 in 4:3 ratio)....

April 13, 2022 · 1 min · 162 words · ARJ

Creating circular thumbnails in the terminal

Circular pictures (like the one to the right) has become increasingly popular on the web. We have, for example, included circular pictures in RITMO’s annual report, and we therefore also wanted to use circular pictures in a presentation at our upcoming LARGO conference. The question, then, is how to create such circular pictures? The circular pictures in the annual report are made through a CSS overlay. So if you try to right-click and save one of those, you will get the original rectangular version....

September 13, 2019 · 2 min · 415 words · ARJ

Image size

While generating the videograms of Bergensbanen, I discovered that Max/Jitter cannot export images from matrices that are larger than 32767 pixels wide/tall. This is still fairly large, but if I was going to generate a videogram with one pixel stripe per frame in the video, I would need to create an image file that is 1 302 668 pixels wide. This made me curious as to what type of limitations exist around images....

July 16, 2011 · 1 min · 159 words · ARJ