alignment of >8-bit types in ppmload
Author: jcupittCreated Sep 25, 2026Updated Sep 25, 2026
Labelsenhancement
Platforms like ARM can crash for unaligned datatypes, like float on a non-four-byte-boundary. ppmload does not test alignment before trying to read PFM files with a float pointer.
To fix this, add a new path for unaligned > 8-bit data (this will be slow!), and add something to ppmsave to insert padding to ensure alignment.
Source: libvips/libvips