Here you can find the source of getSize(BufferedImage image)
public static Dimension getSize(BufferedImage image)
//package com.java2s; /******************************************************************************* * Copyright (c) 2014 Open Door Logistics (www.opendoorlogistics.com) * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Lesser Public License v3 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/lgpl.txt ******************************************************************************/ import java.awt.Dimension; import java.awt.image.BufferedImage; public class Main { public static Dimension getSize(BufferedImage image) { return new Dimension(image.getWidth(), image.getHeight()); }/*from www.ja va2s . com*/ }