Error when using the picture convertor

I want to use the multiformat picture convertor of John Tegelaar to import bitmap pictures in Navision. After calling the convertor in Navision I get the following error message: Run-time error ‘50003’ unexpected error Has anyone a solution?

I use that converter, too. Sometimes we convert/import images by thousands … without any problem! But, what’s important, that there is a YIELD after each Programm-Call, e.g.

Report OnAfterGetRecord()
...
SHELL('c:\imageconverter.exe', FromImage, ToImage);
YIELD;
...

Maybe this could help … Regards, Jörg Joerg A. Stryk Apollo-Optik, IT/ERP

Thank you for your reply Joerg! But I think I described the problem not correctly. The errror occurs in the line where I call the convertor in the Navision code.

Hmmm … so, how do you call the converter? In our case, it’s like this:

Report Katalog
DataItem Item (Table 27)

OnAfterGetRecord()
...
Item2.GET(Item."No.");
...
Converter := 'C:\Programme\ImgConverter\ImgConverter.exe';
FromImage := STRSUBSTNO('c:\images\%1.jpg', Item."No.");
ToImage := STRSUBSTNO('c:\temp\%1.bmp', Item."No.");
ReturnValue := SHELL(Converter, FromImage, ToImage);
YIELD;
Item2.Image.IMPORT(ToImage, FALSE);
Item2.MODIFY;
YIELD;
ERASE(ToImage);
YIELD;
...

Best Regards, Jörg Joerg A. Stryk Apollo-Optik, IT/ERP

Hello Joerg. I have tried your code. It helped with analyzing. The problem is that the resulting bmp file, ToImage in your code, not exists after calling the convertor. The PictureConvertor has 3 parameters. When I use the last parameter, a switch to show the converted picture, I get the error message as described. When I don’t use the switch no error message occurs until the line where the picture is imported. In that case the message says that the file you want to import, does not exist.

Hi, U can let me know if this issue is solved r not. If not I have a work around for you which we had implemeted at our customer site.

Hi Khan, This issue is still not solved. I am interested in your work around!

Hi Bernie, I dont know how to attach some files in this forum. I suggest you to drop me an email to khan@multisoft.com.sg I will reply you back with 1 table, two forms along with picture converter.exe, msvbvm60.dll and instructions on how to do it. Regards Khan\