Business Central and Images

Business Central and Images

Last week I did a compare of the Business Central 18 system app and the new Business Central 19 system app. And there where a couple of things added. And for fun I looked deeper into the image module.

Geen alternatieve tekst opgegeven voor deze afbeelding

And in the passed if you want to work with images there was a dotnet Image in codeunit 3010 – DotNet_Image (in our solution we use it only one times. But hey you can use is 😉 ). And this week there was indeed an update about it: Componentization of Image module | Microsoft Docs

But what kind of functionality is in there? If you look into codeunit 3971 – Image al the functions are listed. Especially the Resize and Crop functionality are new.

To get a image into the module you have two option. As a stream or a base64 string. Then you can get the high, width and the format. Just for some more info.

So if we have an image like this one:

Geen alternatieve tekst opgegeven voor deze afbeelding

And you upload this in Business Central you get the following info with thise code:

Geen alternatieve tekst opgegeven voor deze afbeelding
Geen alternatieve tekst opgegeven voor deze afbeelding

And if you resize it with the following code:

Geen alternatieve tekst opgegeven voor deze afbeelding

You get a nice small image back.

Geen alternatieve tekst opgegeven voor deze afbeelding

So good luck with your images 😊.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.