Merge pull request #1210 from lovell/cast-remove-float-floor

Avoid artefacts when casting from float to int (master)
This commit is contained in:
John Cupitt 2019-01-12 13:48:25 +00:00 committed by GitHub
commit 98def52715
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -195,9 +195,7 @@ G_DEFINE_TYPE( VipsCast, vips_cast, VIPS_TYPE_CONVERSION );
OTYPE * restrict q = (OTYPE *) out; \
\
for( x = 0; x < sz; x++ ) { \
TEMP v = VIPS_FLOOR( p[x] ); \
\
q[x] = CAST( v ); \
q[x] = CAST( p[x] ); \
} \
}