Is select_format() function called from gdk_x11_draw_pixbuf() is assuming the in memory data format as ABGR always??
- From: prudhvi raj <prudhviraj v gmail com>
- To: gtk-devel-list gnome org
- Subject: Is select_format() function called from gdk_x11_draw_pixbuf() is assuming the in memory data format as ABGR always??
- Date: Wed, 3 Aug 2011 19:41:38 +0530
Hi,
Can any one explain why the select_format() function called from gdk_x11_draw_pixbuf() is always checking for ABGR XRenderPictFormat before checking for ARGB??
If i am not wrong, the select_format() function is supposed to return the XRenderPictFormat that matches with the color format of the source image supplied by GdkPixbuf.
When i am trying to analyze the format values returned by this select_format() function with different JPEG/PNG/TIFF images with various color formats (ARGB, ABGR, XBGR etc), irrespective of the format in which the actual image data is arranged, select_format() always checks for the ABGR format only and returns the GDK_X11_FORMAT_EXACT_MASK as format_type. In no case, it returns ARGB.
I tried changing the image raw data from ABGR to ARGB at gdk_image_loader end, but still select_format() returns ABGR only.
Is this format selection order is implemented assuming the src_image format would always be ABGR only??
My requirement is to convert image with any color format to ARGB before it is supplied XRenderComposite() called from draw_with_images() in gdkdrawable-x11.c
But default behaviour in gtk+-2.18.9 the above mentioned function is always giving data in ABGR format only.
Can some one explain the reason behind this XRenderPictFormat selection??
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]