small workaround for read_imagef() problem