We can get a sub image from BufferedImage using getSubimage(int,int,int,int)
,
but my problem is I want to get exact subimage(rectangle image) by passing double values as width
and height
. Is there any alternative for that ?
cast the double values to int.
getSubImage((int)x, (int)y, (int)width, (int)height);
and as @camickr mentioned The internal cells will still be represented by integer pixel values. If each cell is 5 pixels square. The first cell starts at (0, 0), the second cell starts at (5, 0) etc...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With