Re: Getting the colormap of a GdkImage




Arthur Jerijian <lightmanaj@earthlink.net> writes:

> I am currently working on enhancing GdkMagick to support the
> conversion of GdkDrawables and GdkImages into ImageMagick images,
> which can be later saved to disk. I have taken a look at the
> GdkImage functions and discovered that there is no way to retrieve a
> colormap for a GdkImage. Without the image's colormap, I am unable
> to convert the pixel values into RGB values that ImageMagick
> understands. Do any of you have any suggestions?

Well, a GdkImage does not contain any information as to the
colormap of the source drawable. In fact, if the source
drawable was a GdkPixmap, there may be no associated colormap.
(A pixmap just stores pixel values - there is no association
of those pixel values to colors until you draw them to 
a window.)

So, basically, the user will need to pass in a GdkColormap
into the function to convert GdkImage => ImageMagick image.

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]