c
if (sp->v_sampling <= 0 || DCTSIZE <= 0) {
    TIFFErrorExt(tif->tif_clientdata, module,
                 "Invalid JPEG sampling factor or DCT size");
    return (0);
}

if ((td->td_tilelength % (sp->v_sampling * DCTSIZE)) != 0) {
    TIFFErrorExt(tif->tif_clientdata, module,
                 "JPEG tile height must be multiple of %d",
                 sp->v_sampling * DCTSIZE);
    return (0);
}
