简体   繁体   中英

WebImage returning as PNG when source file is JPG

I have this confusing problem when WebImage retrieves an image saved as ".jpg" it returns as ".png".

Here's the image of the problem:

png - jpg 错误

Any ideas why this is happening?

UPDATE : The lighthouse.jpg is one of the My Picture samples of Windows 7 and was uploaded and saved with no frills.

Here is my upload method when uploading the lighthouse.jpg which is saved with uploadImage.SaveAs(path);

上传方式

如果没有相应的图像,则无法 100% 解决此问题,但是扩展名(在您的情况下为 jpg)绝不保证该文件实际上是该文件格式...我怀疑它是使用扩展名保存的 PNG JPG...

The image's Mime type may be set differently to its file-suffix. Ref.https://stackoverflow.com/a/14587821/6812820

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