Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Parse web images from HTTP

Posted on 2003-11-20
5
Medium Priority
?
239 Views
Last Modified: 2010-04-05
Hi,

I'm trying to load jpg images from a web server.
I have succeeded to send the GET command to the
web server, and after that I get these lines:

..
..
Content-type: image/jpg
Content-length: 26232

(... binaries....)

I'm trying to save/parse the binaries to a jpg file
but I do not know how, can anyone help me?

It is important that I program on this level, and
not on higher level by using a web image component
because I in the future I have to parse streaming
images through the web.

regards,
huferry
0
Comment
Question by:huferry
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 1

Expert Comment

by:User137
ID: 9789059
Would this component be handy? It can download any files silently from internet, it's free and source included. At least it may have something to learn from...
HTTPGet at: http://www.utilmind.com/
0
 
LVL 3

Accepted Solution

by:
JDuncan earned 100 total points
ID: 9798012
Are you using any components to access the web, to do what you want using indy its as simple as

        ASource:=TFilestream.Create(myFile,fmCreate+fmShareCompat);
        Get('http://mySite/myURL,ASource);
        ASource.Free;
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 9800588
Apparently he is using WinInet functions. I have no idea how to do that using WinInet.
0
 
LVL 3

Expert Comment

by:JDuncan
ID: 9803383
To use wininet to download files from the net use the function

InternetReadFile(handle,addr(buffer),sizeof(buffer),BytesRead);

Where handle is returned by InternetOpenUrl function.

You decide how many bytes to read at atime by setting the buffer size.
and you can write the buffer to a file or filestream , maybe directly to the jpeg stream
0
 
LVL 3

Expert Comment

by:JDuncan
ID: 9803460

I worked on this question some time ago , it has code for uploading downloading files via wininet.


http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20763209.html#9765274
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question