Results 1 to 4 of 4

Thread: HTTP : Load and display image.

  1. #1
    Join Date
    Sep 2007
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default HTTP : Load and display image.

    I want to load an image from the web and display it in SCAR.
    Is it possible to do?

  2. #2
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    I'm not sure was there a shorter way, but atleast doing a GetPage, saving it to a .bmp, and doing a LoadBitmap should work.

  3. #3
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

    Default

    Quote Originally Posted by n3ss3s View Post
    I'm not sure was there a shorter way, but atleast doing a GetPage, saving it to a .bmp, and doing a LoadBitmap should work.
    How would you save it to a bmp and do a LoadBitmap?

  4. #4
    Join Date
    Sep 2007
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    the problem is that the particular image i want to load is an jpeg file.

    It would have been nice if scar could share its cookies with MS IE or Firefox.
    Its like i have to login to acess that image...
    And the image its randomly generated... just like those in image verification.

    EDIT :

    Ok i solved my problem...

    Code:
    program New;
    var http_client,file_num :integer;
    image :string;
    
    Const
    image_url:='.jpg';  //Enter the internet address of the jpg image file.
    
    begin
    http_client:= InitializeHTTPClient(true,true);
    image:=GetPage(image_url);
    file_num:= RewriteFile(scriptpath+'image.jpg', false)
    if (file_num > -1) then
      begin
      WriteFileString(file_num,image)
      end
    end.
    This is just a work around...
    I just needed to view that image.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 14
    Last Post: 06-07-2013, 02:46 AM
  2. [Question] About Thread display mode OPTIONS
    By Demonhound in forum SRL Site Discussion
    Replies: 2
    Last Post: 01-28-2008, 03:48 PM
  3. Do i have to free an image thats set to another image?
    By NewToAutoing in forum OSR Help
    Replies: 14
    Last Post: 06-06-2007, 05:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •