使用javscript或.net将所有图像格式转换为jpg图像格式 [英] all image formats to jpg image formats using javscript or .net

查看:123
本文介绍了使用javscript或.net将所有图像格式转换为jpg图像格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目中,客户或供应商将上传图像,这些图像将为gif,png,位图,tiff或任何图像格式.
我的问题是如何将这种格式转换为jpg图像格式.通过使用javascript或.net,但我需要尽快解决.请大家帮助我,谢谢inadvance.

In my projects, the customer or suppliers will upload the images, the images will be in gif,png,bitmap,tiff or any image formats.
My question is how to convert this format to jpg image formats. By using javascript or .net, but i need the solution as soon as possible. Please anyone help me, thanks inadvance.

推荐答案

在C#中,无论供应商提供的图像是什么,只要将其读到位图即可.

就像Bitmap bmp1 = new Bitmap("imageName");

然后
bmp1.SaveAs("NewName",FileFormat.JPG);

并将图像转换为jpg格式.
As I think in C# , whichever image is provided by the supplier just read it to a bitmap

like Bitmap bmp1 = new Bitmap("imageName");

then
bmp1.SaveAs("NewName",FileFormat.JPG);

and the image is converted to jpg format.


这篇关于使用javscript或.net将所有图像格式转换为jpg图像格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆