private int similarSizes(out ImageInfo first,out ImageInfo second, int i, int j)
{
int size = images[i].Height * images[i].Width;
int size2 = images[j].Height * images[j].Width;
if ( (double)size / size2 != 1.0)
{
if (size2 < size)
{
first = new ImageInfo(images[i], new Size(images[j].Width, images[j].Height));
second = new ImageInfo(images[j], new Size(images[j].Width, images[j].Height));
return size2;
}
else
{
first = new ImageInfo(images[i], new Size(images[i].Height, images[i].Width));
second = new ImageInfo(images[j], new Size(images[i].Height, images[i].Width));
return size;
}
}
else
{
//first = new ImageInfo(images[i], new Size(images[i].Height, images[i].Width));
//second = new ImageInfo(images[j], new Size(images[i].Height, images[i].Width));
first = images[i];
second = images[j];
}
return size;
}