Need som help writing raw data to a jpg
| From: | Tomas Zajc | Date: | Wed, 08 Nov 2006 22:31:01 +0000 |
| Subject: | Need som help writing raw data to a jpg | ||
| Groups: | php.gd.devel | ||
| Request: | Send a blank email to php-gd-devel+get-17@lists.php.net to get a copy of this message | ||
Hi!
I'm just starting using libgd and I wold need some help. I'm trying to make a
program that should be able to write some raw data I've got on a float
pointer to a jpg file. I couldn't find the correct way to do it looking at
the examples on the gd page.
so long I got
im = gdImageCreate(outsamples, outlines);
black = gdImageColorAllocate(im, 0, 0, 0);
white = gdImageColorAllocate(im, 255, 255, 255);
if((quick=fopen(argv[2], "wb"))==NULL)
{
printf("No se pudo abrir el jpg archivo de salida %s\n", argv[2]);
return 2;
}
gdImageJpeg(im, quick, 70);
but I cant put my data into the im pointer. I I'm not sure which function
should I use to do it. I tried: gdImageCreateFromJpegPtr(int size, void
*data) withpout any help.
I'm now starting to doubt if gd can do such thing.
Any sugestion?
Tomas