Image resize / conversion

How can I resize a picture and save it to bmp (which is the only supported format by navision?)? I’ve constructed a .NET dll which can do the trick, but I can’t seem to register it in Navision. This code has also been compiled to a .exe file, but using shell() forces a short popup which is not wanted… So I either need another solution for the resize of the image, or I need to know how to register my dll.

You may want to have a look at the embedded controls download here on mibuso: http://www.mibuso.com/dlinfo.asp?FileID=333 Embedded controls includes a pictureviewer which can do a lot more then the standard navision picture possibilities. - display different formats (bmp/gif/jpg/etc.) - eventually size it to fit the picturebox - it is embedded on a navision form!

Very nice control, I must say. However this rises two problems. - License to pay. The code in .NET is aprox. 10 lines of code, and its free. - The use of it. I need to print pictures, and therefore need the picture in bmp format. I do not need advanced forms and other stuff, just need to resize various pictures to bmp and output it to a file on a networkdrive.

True, the control cannot print. What i think you need to do with the DLL is to so called ‘expose it to COM’. Standard .net doesnt support COM interfaces anymore. You must set it before compiling. There must be a property somewhere in .NET (look under project and then properties). I dont know what it is and cant check it right know, but im sure you will find it. When you find this property and recompile the project i think you must be able to use the DLL in Navision.

Use IrfanView (http://www.irfanview.com/) then program have varius commandline options you can access from Navision SHELL command. Example for conversion: i_view32.exe c:\test.bmp /convert=c:\test.jpg Convert file: ‘c:\test.bmp’ to ‘c:\test.jpg’ without GUI. i_view32.exe c:*.jpg /convert=d:\temp*.gif i_view32.exe c:*.jpg /resample=(500,300) /convert=d:\temp*.png i_view32.exe c:*.jpg /resample=(500,300) /aspectratio /convert=d:\temp*.png The price of IrfanView is 10 EUR / 10 USD for commercials users