Re: [GD-DEVEL] Question about importing data from memory
| From: | Pierre | Date: | Wed, 28 Nov 2007 16:07:18 +0000 |
| Subject: | Re: [GD-DEVEL] Question about importing data from memory | ||
| References: | 1 2 3 | Groups: | php.gd.devel |
| Request: | Send a blank email to php-gd-devel+get-289@lists.php.net to get a copy of this message | ||
Hi Jeff,
On Nov 28, 2007 5:02 PM, Jeff Cunningham <jeffrey@cunningham.net> wrote:
> Thanks, Pierre. I'll look at that code. How do you handle Truecolor
> images? From what I've seen in your code it looked like they still used
> an indexed palette, only a much bigger one. Is this not the case? I
> definitely need to be working with 24-bit color (8-bits per r,g,b gun).
Palette based images store the index of the palette entry in the image
arrays (one per channel). Truecolor images have the color values
stored directly in the buffer. The format is 31bit RGBA, 8 bit for R,
G or B and 7 for the alpha. You can see the exact mask in gd.h. The
size of the buffer is width * eight * sizeof(int).
> Yes, if you want to give me a prototype for gdImageCreateFromData, I
> would be happy to help in any way I can.
ok, I will give it a try this week or early next week.
Regards,
--Pierre