-1

如果这听起来有点尴尬,伙计们很抱歉。任何人都可以帮助计算图像尺寸的平均尺寸。

Dimension d = new Dimension (d);
//where: 
int width = (int)d.getWidth
int heigth = (int)d.getHeigth

===> image size = (width, length);
//Example
image1 = (200, 350);
image2 = (250, 280);
image3 = (340, 260);

如何计算 3 张图像的平均尺寸???

4

1 回答 1

1
Dimension result = new Dimension()
result.width = image1.getWidth() + image2.getWidth() + image3.getWidth();
result.height = image1.getHeight() + image2.getHeight() + image3.getHeight();
result.width /= 3;
result.height /= 3;

Basically, just do it like you would any other average.

于 2013-07-09T19:32:12.840 回答