Merge pull request #1210 from lovell/cast-remove-float-floor
Avoid artefacts when casting from float to int (master)
This commit is contained in:
commit
98def52715
@ -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] ); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user