diff options
-rw-r--r-- | libtiff/tif_luv.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libtiff/tif_luv.c b/libtiff/tif_luv.c index 051721e8..021756d5 100644 --- a/libtiff/tif_luv.c +++ b/libtiff/tif_luv.c @@ -953,6 +953,13 @@ static { register int vi, ui; + /* check for NaN */ + if (u != u || v != v) + { + u = U_NEU; + v = V_NEU; + } + if (v < UV_VSTART) return oog_encode(u, v); vi = tiff_itrunc((v - UV_VSTART) * (1. / UV_SQSIZ), em); |