cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: curl and grabbing images ?

From: Augustus Saunders <augustus.saunders_at_verilogix.net>
Date: Thu, 24 Mar 2005 09:54:34 -0800

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.

Augustus

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 >
> image222.bmp"
>
> 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.
> Hien
Received on 2005-03-24

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET