cURL Mailing List Monthly Index Single Mail
curl-library Mailing List Archives
Re: curl and grabbing images ?
Ok, using libcurl and curl command line are pretty different. You
should read the documentation for curl_easy_setopt and find the options
you want. In a nutshell, the "| djpeg -bmp -grayscale > image222.bmp"
is not included in the URL. The URL parameter is not a unix shell (or
dos shell) command line, it is just the URL. So you will need to
download the jpeg first and then invoke djpeg (using a system call) to
convert it to a bitmap. To save the jpeg to a file, you'll need to
fopen the target file, and then pass the FILE* to curl as the
CURLOPT_WRITEDATA parameter. See the curl_easy_setopt docs for more info.
Hien Nguyen wrote:
> Hi all,
> I am programming Visual C with curl library. I try to capture an image
> from a server to process. If I use:
> curl_easy_setopt(curl, CURLOPT_URL,
> "http://192.168.1.226/jpg/image.jpg | djpeg -bmp -grayscale >
> There's no error. However, I do not find the image222.bmp.
> For the curl command line, that's okie.
> Please help me. Thank you.
Received on 2005-03-24
These mail archives are generated by hypermail.
Page updated November 12, 2010.
File upload with ASP.NET
web site info