tiffenc: fix packet size calculation