Page 1 of 1

GdPicture error .NET Core in Linux (Ubuntu)

Posted: Wed Dec 04, 2019 1:45 pm
by jeanleno
Hi!

I made a test application in .NET Core and it works in Windows, but when I publish to Linux I got this error on GdPicture registration:

Code: Select all

Unable to load shared library 'kernel32' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libkernel32: cannot open shared object file: No such file or directory -    at ᤫ.LoadLibrary(String A_0)
   at ᥥ.ᜀ(Boolean A_0, Boolean A_1)
   at ᡌ.ᜀ(Boolean A_0, Int32 A_1, Boolean A_2)
   at GdPicture14.LicenseManager..ctor()
   at GdPictureThumbnailCore.Program.RegistraGdPicture() in C:\Users\jean.heidemann\source\repos\GdPictureThumbnailCore\GdPictureThumbnailCore\Program.cs:line 4
What am I doing wrong?
I just register GdPicture, load a PDF and create a Thumbnail of it.

This is my full source code

Code: Select all

using GdPicture14;
using System;
using System.Drawing;
using System.IO;

namespace GdPictureThumbnailCore
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {

                Console.WriteLine("DEBUG 1");
                RegistraGdPicture();
                Console.WriteLine("DEBUG 2");
                using (GdPicturePDF gdPdf = new GdPicturePDF())
                {
                    Console.WriteLine("Enter the PDF path");
                    String pdfPath = Console.ReadLine();
                    gdPdf.LoadFromFile(pdfPath, false);
                    Console.WriteLine("DEBUG 4");
                    int thumbId = gdPdf.CreateThumbnailHQ(300, 200, Color.Transparent);
                    gdPdf.CloseDocument();
                    using (GdPictureImaging img = new GdPictureImaging())
                    {
                        Console.WriteLine("Enter the Thumbnail path (JPG)");
                        String thumbPath = Console.ReadLine();
                        img.SaveAsJPEG(thumbId, thumbPath);
                        Console.WriteLine("DEBUG 6");
                        img.ReleaseGdPictureImage(thumbId);
                    }
                }

            } catch (Exception e)
            {
                Console.WriteLine(e.Message + " - " + e.StackTrace);
            }
            Console.WriteLine("THE END");
            Console.ReadKey();
        }

        private static void RegistraGdPicture()
        {
            var key = "MY KEY HERE";
            new LicenseManager().RegisterKEY(key);
        }
    }
}

Re: GdPicture error .NET Core in Linux (Ubuntu)

Posted: Wed Dec 04, 2019 3:12 pm
by Hugo
Hi jeanleno,

GdPicture is only supported in Windows as mentioned here: https://www.gdpicture.com/guides/gdpicture/Ope ... ments.html
This should solve your issue.

If you have any other questions feel free to contact us via ticket or post it in the different subsections of the forum. Any feedback is very much appreciated and we are constantly looking to improve our software. Ticket link: https://orpalis.zendesk.com/hc/en-us/requests/new

Re: GdPicture error .NET Core in Linux (Ubuntu)

Posted: Mon Feb 15, 2021 7:34 pm
by finchalex
GdPicture.NET runs on Microsoft Windows operating systems family since Windows Vista and Windows Server 2008 in both 32-bit and 64-bit versions.

GdPicture.NET is available as a .NET Framework 4.5 and .NET Core 3.0 assembly.

Both GdPicture.NET versions are compiled using the AnyCPU Platform target.

Re: GdPicture error .NET Core in Linux (Ubuntu)

Posted: Thu Oct 13, 2022 3:44 pm
by Loïc
Hello Jeanleno,

Great news, Linux support has been introduced in GdPicture 14.2 release.

You will need to update your main GdPicture assembly to GdPicture.NET.14.API.dll

Please refer to the change log: https://www.gdpicture.com/products/version-history/

With best regards,

Loïc