Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Display app-generated image in application

Please login with a confirmed email address before reporting spam

Hi,
In essence I have an application, which I run from the browser, that generates an image pic.png (on the server, I know the full path to it) and I want to display that image in the application. How do I do that?

This way only works if the image is already in the image library:
app.form("form1").formObject("image1").set("icon", "pic.png");
so this does not work:
app.form("form1").formObject("image1").set("icon", "fullpathtofolder/pic.png");
and I don't seem to be able to add it to the image library script-wise.

I also tried reading in the image as a function (which I can do programatically under "global definitions"), plotting it, im1(root.x, root.y), and then showing it in the application but the data is rescaled to blue-red.

Any help would be much appreciated.
Regards
Staffan

0 Replies Last Post Jul 6, 2017, 1:32 a.m. EDT
COMSOL Moderator

Hello Staffan H

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.