[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-devel
Subject:    Re: Is select_format() function called from gdk_x11_draw_pixbuf() is
From:       prudhvi raj <prudhviraj.v () gmail ! com>
Date:       2011-08-18 9:36:58
Message-ID: CAGasw4CYWcTTAirj1yMTiYwqX-MSA73HGX5gNFEE2pp3sXhSxw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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??
Can we query for the format in which the actual image buffer is aligned,
rather than querying in some fixed order like ABGR first .... next ARGB
etc??


On Wed, Aug 3, 2011 at 7:41 PM, prudhvi raj <prudhviraj.v@gmail.com> wrote:

> 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??
>

[Attachment #5 (text/html)]

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??<div>Can we query for the format in which the actual image buffer is \
aligned, rather than querying in some fixed order like ABGR first .... next ARGB \
etc??<br> <div><br><br><div class="gmail_quote">On Wed, Aug 3, 2011 at 7:41 PM, \
prudhvi raj <span dir="ltr">&lt;<a \
href="mailto:prudhviraj.v@gmail.com">prudhviraj.v@gmail.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex;"> Hi,<div><br></div><div>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??</div><div>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.</div>

<div>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. </div>

<div><br></div><div>I tried changing the image raw data from ABGR to ARGB at \
gdk_image_loader end, but still select_format() returns ABGR only.</div><div>Is this \
format selection order is implemented assuming the src_image format would always be \
ABGR only??</div>

<div><br></div><div>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</div><div>But default behaviour in gtk+-2.18.9 the above mentioned \
function is always giving data in ABGR format only.</div>

<div>Can some one explain the reason behind this XRenderPictFormat selection??</div>
</blockquote></div><br></div></div>



_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic