然后我在css文件中添加库
using FreeImageAPI;
FIBITMAP dib = FreeImage.LoadEx(imageName);
// Check success
if (dib.IsNull)
{
Response.Write("Could not load Sample.jpg");
}
// Convert Bitmap to JPEG2000 and save it on the hard disk
FreeImage.Save(FREE_IMAGE_FORMAT.FIF_JP2, dib, "Image.jp2", FREE_IMAGE_SAVE_FLAGS.EXR_PXR24 | FREE_IMAGE_SAVE_FLAGS.EXR_LC);
// Unload source bitmap
FreeImage.UnloadEx(ref dib);
ImageConverter converter = new ImageConverter();
byte[] fdib = (byte[])converter.ConvertTo(dib, typeof(byte[]));
string file_type = "application/jp2";
string file_name = "Image.jp2";
return File(fdib, file_type, file_name);
它构建了suceed,但是当我尝试执行方法时它会给我错误: “FreeImageNET.dll中出现'System.IO.FileNotFoundException'类型的例外但未在用户代码中处理
然后我读到需要通过引用添加dll,但也有问题 error
请帮助我。