I am trying to get the length of an image as well as the length of a portion of it, but both give the same result. Where did I go wrong?
Part of area of image:
private BufferedImage add_text(BufferedImage image, String text) {
BufferedImage imageLocation=image.getSubimage(image.getWidth()/2, image.getHeight()/2,
image.getWidth()-image.getWidth()/2, image.getHeight()-image.getHeight()/2);
byte img[] = get_byte_data(imageLocation);
System.out.println("Image length: "+img.length);
Whole image:
private BufferedImage add_text(BufferedImage image, String text) {
byte img[] = get_byte_data(image);
System.out.println("Image length: "+img.length);
The output of both is
Image length: 984900