1
C#.net我有下面的代碼中,我沒有得到的含義:相關圖片
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";
}
}
謝謝
@ user2166457,沒問題。如果此答案足夠,請將其標記爲已接受。謝謝 –