How can I read&show image using .dll from C# ASP.NET Web app?

조회 수: 1 (최근 30일)
Ji Hyun Seo
Ji Hyun Seo 2018년 1월 19일
Hi I trying to run dll(generated from matlab library compiler in .NET Assembly) in C# ASP.NET Web application. It is supposed to read the image and show it's figure.
But if I click the button(made at WebForm) MWMCR::EvaluateFunction error shows up saying that the image file does not exist. The matlab function works well when I run it in matlab r2017a.
Does anyone know how to solve the problem?
This is the matlab code *******************
function showdisplay()
path= 'C:\Users\VC\Pictures\penquin.jpg';
image=imread(path);
imshow(image);
end
*************
And C# code
using MathWorks.MATLAB.NET.Arrays;
using MathWorks.MATLAB.NET.Utility;
using showdisplay;
namespace WebApplication_Test
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
ShowDis obj = new ShowDis();
obj.showdisplay();
}
}
}

답변 (0개)

카테고리

Help CenterFile Exchange에서 Deploy to .NET Applications Using MWArray API에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!