IdHTTP and AXIX IP Camera

Giganews Newsgroups
Subject: IdHTTP and AXIX IP Camera
Posted by:  Quinn (qui…@thehost.co.za)
Date: Mon, 28 Mar 2011

Hi

Delphi 7 Indy 10.5.8

I was having intermittent problems getting a JPEG from and AXIS camera.
It worked but every now and then the image would be problematic.
I wondered if it was Indy 10.2.3 so I upgraded to 10.5.8

Now I cannot get images at all.
This code used to work.

IdHTTP := TIdHTTP.Create( nil );
try
      IdHTTP.Request.BasicAuthentication := True;
      IdHTTP.Request.Username := sUSER;
      IdHTTP.Request.Password := sPASS;

      imageStr := IdHTTP.Get( 'http://' + sIP + sCMD );

      try
      imageStream := TStringStream.Create( imageStr );
      JpgImage.LoadFromStream( imageStream );
      finally
        imageStream.Free;
      end;

finally
      IdHTTP.Free;
end;

I don't just want to revert back to older ver of Indy.
There must be more properties to set with the new version that I do not know
of?

Can you please advise.

Regards Quinn

Replies