Picture from internet

Arjan_SomersArjan_Somers Member Posts: 64
Hello all.
I'd like to load an image from the internet. Is there anyway to do this?

Can i IMPORT something from a http link?

Cuurent setup i tough of was to install something like wget, call it using the SHELL command, and then convert it using imagick or some other graphics conversion tool, and then IMPORT it and show it in navision.

This has some obvisous drawback, like the requirement to have certain applications installed on client machines.

So what i want to know: Is there a more elegant way to do this?

Comments

  • rvduurenrvduuren Member Posts: 92
    Try: http://www.mibuso.com/forum/viewtopic.p ... t-XP-sucks

    Let me know if this is what you mean.. (it worked for me : - ) )
    Met vriendelijke groet, best regards,

    Rvduuren
  • Arjan_SomersArjan_Somers Member Posts: 64
    That seems excatly what i need. Missed it when i searched the forum.

    Thanks a lot!
  • gulamdastagirgulamdastagir Member Posts: 411
    I got the Picture saved at 'C:\picture.jpeg' ok
    but when i set SourceExpr of PictureBox to ci.Picture i see a "no-Entry Sign"
    or for the matter go to Company info form and try to import from C:\picture.jpeg i get the same "no entry sign",navision takes only .BMPS even in BLOB Fields? :sick:

    i dont know what the excitement is about? :mrgreen:
    Regards,

    GD
  • Arjan_SomersArjan_Somers Member Posts: 64
    It is only a way to download something from the internet using navision. But to display it, you still have to use something to convert it to a bitmap.
    (Examples can be found in the download section)
  • Arjan_SomersArjan_Somers Member Posts: 64
    I have a problem using this code on a Navision 3.60b client.

    It only has support for a few variant types, and a only few casts are possible using variants.

    So using:
    is := var;
    

    Results in an error because it's not possible to cast a variant to an stream in 3.60b.

    Does anybody know a way around this, because this makes it kindda useless.

    I tried creating a DOM-document, but of course it won't parse, wich results in an empty document.
    I also tried the other types of results like, responseText, but this only returns
    ?PNG

    (Unreadable character)

    So does anybody know a way to use XMLHTTP to download non-XML in 3.60b?
  • rvduurenrvduuren Member Posts: 92
    I have a problem using this code on a Navision 3.60b client.

    It only has support for a few variant types, and a only few casts are possible using variants.

    So using:
    is := var;
    

    Results in an error because it's not possible to cast a variant to an stream in 3.60b.

    Does anybody know a way around this, because this makes it kindda useless.

    I tried creating a DOM-document, but of course it won't parse, wich results in an empty document.
    I also tried the other types of results like, responseText, but this only returns
    ?PNG

    (Unreadable character)

    So does anybody know a way to use XMLHTTP to download non-XML in 3.60b?

    NAV >= 4.00 only b/c of BigText.
    I have not found a (simple) solution for NAV < 400, so back once again to C# combine "How to use HttpWebRequest and HttpWebResponse in .NET"
    Met vriendelijke groet, best regards,

    Rvduuren
  • Arjan_SomersArjan_Somers Member Posts: 64
    Thanks for the (somewhat late) reply :lol:

    I have found a nice solution using imagick. This is a free library wich makes it possible to download/convert/resize/edit/etc/etc images from the commandline.
    And the commandline is of course accessible from Navision.

    I would recommend it since it's an all-in-one solution for converting and downloading and it has many other options to boot.
Sign In or Register to comment.