This is a .NET library that converts any MS-SQL Image type Column's Data into jpg file. The library is specifically designed to be used with PowerBuilder applications. but any COM or .NET(C#) method calling can use this project artifact
- Convert Image byte stream to JPG byte stream
- Windows 10 20H2 or Later (server 2022 or later)
- .NET Framework 4.8.1
- Not Ensured, but it should work with .NET 4.8 and windows 7 or later
- MS introduce no comapatibility change from .NET 4.8 to .NET 4.8.1
- then, it should work with .NET 4.8 and windows 7 or later
- MS introduce no comapatibility change from .NET 4.8 to .NET 4.8.1
- (For Development) Visual Studio 2022+
- or .NET 8+ SDK for using dotnet build command
- Open the solution in Visual Studio
- Build the solution in Release mode
- if you want to build with dotnet cli(cause of not having visual studio)
dotnet build ms-sql-image2jpg.csproj --configuration Release
-
Use PowerBuilder's ".NET DLL Importer" tool to import the assembly:
- Open your PowerBuilder project
- Select Tools → ".NET DLL Importer"
- Browse to and select dll file
- Generate the proxy object
-
Create an instance of the converter:
nvo_imageconverter lnvo_imageconverter lnvo_imageconverter = create nvo_imageconverter
-
Call method of class
lnvo_imageconverter.of_saveasjpg(bPhoto,ls_picture_path)
blob lb_converted_photo lnvo_imageconverter.of_converttojpg(bPhoto)
lnvo_imageconverter.of_convertfiletojpg(ls_picture_path,ls_output_path)