Reading EXIF from JPEG on Linux w/ 22.9 failing

So after updating to Metadata for .NET 22.9 the C# .net 6 JPEG reading code worked in Windows but now reporting a different problem under Linux. I think its trying to reference a library I do not have… Here is all the stack information I could gather.

  •   InnerException	{System.DllNotFoundException: Unable to load DLL 'libgdiplus': The specified module could not be found.
    

    at System.Runtime.InteropServices.FunctionWrapper`1.get_Delegate()
    at System.Drawing.SafeNativeMethods.Gdip.GdiplusStartup(IntPtr& token, StartupInput& input, StartupOutput& output)
    at System.Drawing.SafeNativeMethods.Gdip…cctor()} System.Exception {System.DllNotFoundException}

      Message	"The type initializer for 'Gdip' threw an exception."	string
    
    
      SerializationStackTraceString	"   at System.Drawing.SafeNativeMethods.Gdip.GdipGetGenericFontFamilySansSerif(IntPtr& fontfamily)\n   at System.Drawing.FontFamily.GetGdipGenericSansSerif()\n   at System.Drawing.FontFamily.get_GenericSansSerif()\n   at System.Drawing.Font.CreateFont(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte charSet, Boolean isVertical)\n   at System.Drawing.Font..ctor(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)\n   at System.Drawing.Font..ctor(String familyName, Single emSize, String systemName)\n   at System.Drawing.SystemFonts.get_DefaultFont()\n   at Aspose.Imaging.ImageOptionsBase..ctor()\n   at Aspose.Imaging.ImageOptions.JpegOptions..ctor()\n   at Aspose.Imaging.FileFormats.Jpeg.JpegImage.\u0002(IRasterImageArgb32PixelLoader \u0002, Int32 \u0003, Int32 \u0005)\n   at Aspose.Imaging.FileFormats.Jpeg.JpegImage..ctor(Int32 \u0002, Int32 \u0003, PixelFormat \u0005, IRasterImageArgb32PixelLoader \b)\n   at Aspose.Imaging.FileFormats.Jpeg.JpegImage.\u0002(Int32 \u0002, Int32 \u0003, PixelFormat \u0005, IRasterImageArgb32PixelLoader \b)\n   at \u000f   .\u0002(StreamContainer \u0002, LoadOptions \u0003, \u000e    \u0005)\n   at \u000f   .Load(StreamContainer \u0002, LoadOptions \u0003)\n   at Aspose.Imaging.Image.\u0002(StreamContainer \u0002, LoadOptions \u0003)"	string
    
    
      StackTrace	"   at System.Drawing.SafeNativeMethods.Gdip.GdipGetGenericFontFamilySansSerif(IntPtr& fontfamily)\n   at System.Drawing.FontFamily.GetGdipGenericSansSerif()\n   at System.Drawing.FontFamily.get_GenericSansSerif()\n   at System.Drawing.Font.CreateFont(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte charSet, Boolean isVertical)\n   at System.Drawing.Font..ctor(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)\n   at System.Drawing.Font..ctor(String familyName, Single emSize, String systemName)\n   at System.Drawing.SystemFonts.get_DefaultFont()\n   at Aspose.Imaging.ImageOptionsBase..ctor()\n   at Aspose.Imaging.ImageOptions.JpegOptions..ctor()\n   at Aspose.Imaging.FileFormats.Jpeg.JpegImage.\u0002(IRasterImageArgb32PixelLoader \u0002, Int32 \u0003, Int32 \u0005)\n   at Aspose.Imaging.FileFormats.Jpeg.JpegImage..ctor(Int32 \u0002, Int32 \u0003, PixelFormat \u0005, IRasterImageArgb32PixelLoader \b)\n   at Aspose.Imaging.FileFormats.Jpeg.JpegImage.\u0002(Int32 \u0002, Int32 \u0003, PixelFormat \u0005, IRasterImageArgb32PixelLoader \b)\n   at \u000f   .\u0002(StreamContainer \u0002, LoadOptions \u0003, \u000e    \u0005)\n   at \u000f   .Load(StreamContainer \u0002, LoadOptions \u0003)\n   at Aspose.Imaging.Image.\u0002(StreamContainer \u0002, LoadOptions \u0003)"	string

here is some more inner exception info…

	InnerException	{System.DllNotFoundException: Unable to load DLL 'libgdiplus': The specified module could not be found.

at System.Runtime.InteropServices.FunctionWrapper`1.get_Delegate()
at System.Drawing.SafeNativeMethods.Gdip.GdiplusStartup(IntPtr& token, StartupInput& input, StartupOutput& output)
at System.Drawing.SafeNativeMethods.Gdip…cctor()} System.Exception {System.DllNotFoundException}

	Message	"The type initializer for 'Gdip' threw an exception."	string


	SerializationStackTraceString	"   at System.Drawing.SafeNativeMethods.Gdip.GdipGetGenericFontFamilySansSerif(IntPtr& fontfamily)\n   at System.Drawing.FontFamily.GetGdipGenericSansSerif()\n   at System.Drawing.FontFamily.get_GenericSansSerif()\n   at System.Drawing.Font.CreateFont(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte charSet, Boolean isVertical)\n   at System.Drawing.Font..ctor(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)\n   at System.Drawing.Font..ctor(String familyName, Single emSize, String systemName)\n   at System.Drawing.SystemFonts.get_DefaultFont()\n   at Aspose.Imaging.ImageOptionsBase..ctor()\n   at Aspose.Imaging.ImageOptions.JpegOptions..ctor()\n   at Aspose.Imaging.FileFormats.Jpeg.JpegImage.\u0002(IRasterImageArgb32PixelLoader \u0002, Int32 \u0003, Int32 \u0005)\n   at Aspose.Imaging.FileFormats.Jpeg.JpegImage..ctor(Int32 \u0002, Int32 \u0003, PixelFormat \u0005, IRasterImageArgb32PixelLoader \b)\n   at Aspose.Imaging.FileFormats.Jpeg.JpegImage.\u0002(Int32 \u0002, Int32 \u0003, PixelFormat \u0005, IRasterImageArgb32PixelLoader \b)\n   at \u000f   .\u0002(StreamContainer \u0002, LoadOptions \u0003, \u000e    \u0005)\n   at \u000f   .Load(StreamContainer \u0002, LoadOptions \u0003)\n   at Aspose.Imaging.Image.\u0002(StreamContainer \u0002, LoadOptions \u0003)"	string


	StackTrace	"   at System.Drawing.SafeNativeMethods.Gdip.GdipGetGenericFontFamilySansSerif(IntPtr& fontfamily)\n   at System.Drawing.FontFamily.GetGdipGenericSansSerif()\n   at System.Drawing.FontFamily.get_GenericSansSerif()\n   at System.Drawing.Font.CreateFont(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte charSet, Boolean isVertical)\n   at System.Drawing.Font..ctor(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)\n   at System.Drawing.Font..ctor(String familyName, Single emSize, String systemName)\n   at System.Drawing.SystemFonts.get_DefaultFont()\n   at Aspose.Imaging.ImageOptionsBase..ctor()\n   at Aspose.Imaging.ImageOptions.JpegOptions..ctor()\n   at Aspose.Imaging.FileFormats.Jpeg.JpegImage.\u0002(IRasterImageArgb32PixelLoader \u0002, Int32 \u0003, Int32 \u0005)\n   at Aspose.Imaging.FileFormats.Jpeg.JpegImage..ctor(Int32 \u0002, Int32 \u0003, PixelFormat \u0005, IRasterImageArgb32PixelLoader \b)\n   at Aspose.Imaging.FileFormats.Jpeg.JpegImage.\u0002(Int32 \u0002, Int32 \u0003, PixelFormat \u0005, IRasterImageArgb32PixelLoader \b)\n   at \u000f   .\u0002(StreamContainer \u0002, LoadOptions \u0003, \u000e    \u0005)\n   at \u000f   .Load(StreamContainer \u0002, LoadOptions \u0003)\n   at Aspose.Imaging.Image.\u0002(StreamContainer \u0002, LoadOptions \u0003)"	string

This issue is under investigation with ticket ID METADATANET-3983.

@jkirk865

This is more like an environment related issue. Please install mono for example take a look at this forum thread.

is this a new requirement? I did not believe I had this component in the previous version. It is an embedded Linux system and components have to be individually added (there is no apt-get support).

@jkirk865

Let us further investigate it. We’ll notify you in case of any update.

Did you find out any further information about the new MONO requirement?

@jkirk865

This ticket is still under investigation.