@marcrasi I’m thinking for image transformations we should make it possible to use OpenCV. We used that for the older fastai 0.7 but problems in multiprocessing in python and opencv meant we had to move away from it. But in Swift we can use proper threads, so we won’t have this problem.
There is a ‘LegoCV’ project wrapping OpenCV in Swift, but it doesn’t have an SPM version and doesn’t mention Linux compatibility.
So perhaps creating and using a minimal OpenCV wrapper would be a good thing to do next with your new C-capable package installer? Note that using an optimized OpenCV build (i.e. march=native, or similar) is important - SIMD is critical for being able to process images fast enough to keep the GPU busy.
Also, could you check that your SwiftGD is able to use libjpeg-turbo successfully? Without that, the jpeg loading tends to take more time than everything else combined!