asp.net 图片超过指定大小后等比例压缩图片的方法(2)

System.Drawing.Bitmap img = new System.Drawing.Bitmap(imgPhoto,
                                                                              int.Parse(toImgWidth1.ToString()),
                                                                              int.Parse(toImgHeight1.ToString()));
                        string strResizePicName = Server.MapPath(strImgPath) + filePathName + "/_small_" + fileSysName;
                        img.Save(strResizePicName);
                        filePath = strImgPath + filePathName + "/_small_" + fileSysName;
                    }
                }
            }
            return filePath;
            #endregion
        }

您可能感兴趣的文章:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wjgxzy.html