<span style="white-space:pre"> </span>private void CloneImage(float x, float y, float width, float height, string jpgPath, string bmpPath)
{
//deleteImg(bmpPath);
//获取图像
Bitmap myBitmap = new Bitmap(jpgPath);
//设定图像剪切区域
RectangleF cloneRect = new RectangleF(x, y, width, height);
PixelFormat format = myBitmap.PixelFormat;
Bitmap cloneBitmap = myBitmap.Clone(cloneRect, format);
cloneBitmap.Save(bmpPath, System.Drawing.Imaging.ImageFormat.Gif);
myBitmap.Dispose();
}
就是这个鬼东西, 图片转存的时候, 好像只是改写了一下图片的信息, 图片的创建时间一直未变.
private void deleteImg(string filePath)
{
if (File.Exists(filePath))
{
<span style="white-space:pre"> </span>File.Delete(filePath);
}
}
接着现做删除再做保存, 图片是删除成功了, 但是重新保存的图片依然还是那个生成日期. 这是什么鬼?