Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7972685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:55:54+00:00 2026-06-04T07:55:54+00:00

I have an Expr object in C#, which represents Wolfram Mathematica ‘s type –

  • 0

I have an Expr object in C#, which represents Wolfram Mathematica‘s type – it can hold a number, a mathematical expression, a sound, an image or others.

I had been using the tutorial included with my Wolfram Mathemtica edition for calling Mathematica via .NET, and I want to create an Image from my output. For example, to plot a function or nicely draw an expression.

I have this code:

public System.Drawing.Image ToImage(int width = 300, int height = 300)
{
    return link.EvaluateToImage(this.e, width, height);
}

Where link is my IKernelLink, and this.e is my Expr.

Afterwards, I use image.Save(@"C:\file.png")

The problem is that when I open a form and do form.pictureBox.Image = LoadImage(@"C:\file.png"), or I open the the image with the appropriate program, it gives me an animation of three frames. I will upload it here:

enter image description here

Additionally, it does not give me the whole output, which is {{x -> -(-3)^(1/3)}, {x ->
3^(1/3)}, {x -> (-1)^(2/3)*3^(1/3)}}
(generated with EvaluateToInputForm)
Obviously, this behavior is wrong and can anybody help me with it?

note: it makes a single frame file when the Expr is a graphic object, i.e the evaluation of a Plot function.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:55:55+00:00Added an answer on June 4, 2026 at 7:55 am

    I think you should use a Graphics array to send a collection of images from Mathematica to .NET, ie:

    .NET/Link MathKernel.Graphics Property

    There is an example of the use of this code here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a function which creates a different type of expression depending on the
Imagine I have a recursive algebraic data type like this (Haskell syntax): data Expr
I have a recursive immutable data structure in ocaml which can be simplified to
I have an array of arrays P, which represents a Matrix, as an array
I have an regular expression built in Java. String expr = <a.*?id=\(pres.*?)\.*?>Discharge.*?Medications:</a>; I want
I have this grammar in EBNF notation: expr -> expr (opt1 | opt2 |
I have the following parser grammar (this is a small sample): expr: ident assignop
I have PHP function which checks to see if variables are set and then
I have my own html helper extension, which I use this way <%=Html.LocalizableLabelFor(model =>
I have a good number of regular expressions used for validation. Instead of manually

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.