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.
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:
And you upload this in Business Central you get the following info with thise code:
And if you resize it with the following code:
You get a nice small image back.
So good luck with your images 😊.
Leave a Reply