bioformats icon indicating copy to clipboard operation
bioformats copied to clipboard

Cast to double may be needed

Open scuniff opened this issue 6 months ago • 1 comments

https://github.com/ome/bioformats/blob/0a895ae7e7895e9193c02139ca51189fe5b9c106/components/formats-gpl/src/loci/formats/in/FV1000Reader.java#L1348-L1349

Since width and height are ints, the equation is done with Integer accuracy and not Double accuracy.

To get Double accuracy from the equations, a double cast is needed

Maybe double rx = (double) width / 2; double ry = shapeType == CIRCLE ? rx : (double) height / 2;

scuniff avatar Aug 25 '24 16:08 scuniff