Support for GDI+ on worker
hi all, I'm developing a runbook that generates mail with graphical content using System.Web.DataVisualization.Chart class. Since the runbook grabs data from OMS Log Analytics it is an ideal solution for an Azure worker, alas when I run the runbook I get "A generic error occurred in GDI+'. Any plan to add support for GDI in the Azure worker?
This is something we can look at in the future. Thanks for the feedback and we will update once we determine the best approach here.
Matt Quickenden commented
I to am trying to generate chart objects, I'm not trying to display them, I would like to generate an object and save the image. Are you specifically stopping the GDI objects?
I am load these locally using this code
and the first error seems to be creating a new object.
$Chart = New-object System.Windows.Forms.DataVisualization.Charting.Chart
New-Object : Exception calling ".ctor" with "0" argument(s): "A generic error occurred in GDI+."
At C:\Modules\User\reporthtml\ReportHTML.psm1:760 char:15
+ ... ChartArea = New-Object System.Windows.Forms.DataVisualization.Chartin ...
+ CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException
+ FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand
The rest goes down hill pretty quickly from here.