Am 02.09.22 um 10:39 schrieb Keith McKay via ntg-context: > Thanks for this code Hraban. I tried this last night and it worked > really well. I did have one stumbling block when I noticed that those > image files with a space in their names were not found, however > renaming  without a space solved the problem. Is this a bug or a feature? The call to gm convert was lacking quoting of the file names. Fixed in attachment. While the code does some downsampling, the calculation is not always right, because it doesn’t consider scaling (or something like that). Hraban