简体   繁体   中英

Saving jpeg image with C#

I have a code:

Image image1 = Image.FromFile(sOriginalImageFileName, true);
....
image1.Save(sNewFileName, image1.RawFormat);

It works good for png's. But opening the new jpeg files with Photoshop, I get

"Could not complete your request because the file specifies an unsupported JPEG precision"

What am I doing wrong? Thanks in advance.

使用ImageFormat枚举

image1.Save(sNewFileName, ImageFormat.Jpeg);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM