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; \
|
OTYPE * restrict q = (OTYPE *) out; \
|
||||||
\
|
\
|
||||||
for( x = 0; x < sz; x++ ) { \
|
for( x = 0; x < sz; x++ ) { \
|
||||||
TEMP v = VIPS_FLOOR( p[x] ); \
|
q[x] = CAST( p[x] ); \
|
||||||
\
|
|
||||||
q[x] = CAST( v ); \
|
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user