Need som help writing raw data to a jpg
[email protected] (Tomas Zajc)
| Newsgroups | php.gd.devel |
|---|---|
| Organization | CONAE |
| Message-ID | <[email protected]> |
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