次のコードの意味がわかりませんでした:
double savesize = (8.0 * ((height * (width / 3) * 3) / 3 - 1)) / 1024;
だから私を助けてください。
コード:
private void ImageBrowseButton_Click(object sender, EventArgs e)
{
DialogResult dr = openFileDialog1.ShowDialog();
if (dr == DialogResult.OK)
{
loadedImagePath = openFileDialog1.FileName;
imageTextBox.Text= loadedImagePath;
loadedImage = Image.FromFile(loadedImagePath);
height = loadedImage.Height;
width = loadedImage.Width;
loadedBitmap = new Bitmap(loadedImage);
FileInfo imginf = new FileInfo(loadedImagePath);
float size = (float)imginf.Length / 1024;
SizeLabel.Text = size.ToString() + " KB";
HeightLabel.Text = loadedImage.Height.ToString() + " Pixel";
WidthLabel.Text = loadedImage.Width.ToString() + " Pixel";
double savesize = (8.0 * ((height * (width / 3) * 3) / 3 - 1)) / 1024;
SaveSizeLabel.Text = savesize.ToString() + " KB";
}
}
ありがとうございました