c# 获取图像 宽度 高度 位深度

Image imgPhoto = Image.FromFile(TempPath + obj);
                    float maxsize = imgPhoto.Height * imgPhoto.Width * Image.GetPixelFormatSize(imgPhoto.PixelFormat) / 1024 / 1024; //长(像素) x 宽(像素) x 颜色深度 / 1024 /1024

                    if (maxsize > 4) //图片太大
                    {
                        publicOperation.setShowBoxStyle(SetLanguage.getValues("FileSizeError", "frmPlayList_Message"));
                        return;
                    }

posted on 2009-09-16 16:40  风乔  阅读(2566)  评论(0编辑  收藏  举报

导航