Re: gdk_pixbuf_new_from_file_at_scale() returning error saying Unrecognized image file format when loading png files

2012-06-13 Thread Alexander Larsson
On Tue, 2012-06-12 at 14:40 +, avijit.ma...@wipro.com wrote:
 Hi,
 
 On further debugging I could see the below behaviour:
 
 1. _gdk_pixbuf_get_module receives the buffer header as:89PNG
 2. But when it fetch the mime_type on that buffer it is getting 
 mime_type:application/octet-stream which should be image/png.
 
 Due to this there is a type mismatch in mime_type and hence it is returning 
 error with Unrecognized image file format.
 
 Any idea which could be the reason for this mime_type mismatch?

Gdk-pixbuf optionally uses gio to do mime sniffing, which requires the
shared-mime-info package to be installed. However, the configure script
for gdk-pixbuf explicitly tries to sniff the mimetype for some png data,
and only enables this if that worked.

Are you are building and deploying gdk-pixbuf in different contexts?

___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


RE: gdk_pixbuf_new_from_file_at_scale() returning error saying Unrecognized image file format when loading png files

2012-06-13 Thread avijit.manna
HI Alexandar,

Thanks for your input. I tried installing shared-mime-info package. But still 
it is not working. Below is the snippet how I configure and build 
shared-mime-info and gdk-pixbuf:

cd shared-mime-info-0.90
   ./configure --prefix=$WLD
   make
   make install
   cd ..

   # As of 2012-03-14, gtk git is saying:
   # Requested 'gdk-pixbuf-2.0 = 2.25.2' but version of GdkPixbuf is 2.24.0
   cd gdk-pixbuf
   ./configure --prefix=$WLD --without-libtiff # Is it worth grabbing libtiff?
   make
   make install
   cd ..


Do I need to export any variable also?

Regards,
Avijit

From: Alexander Larsson [al...@redhat.com]
Sent: Wednesday, June 13, 2012 2:06 PM
To: Avijit Manna (WT01 - PES)
Cc: gtk-devel-list@gnome.org
Subject: Re: gdk_pixbuf_new_from_file_at_scale() returning error saying 
Unrecognized image file format when loading png files

On Tue, 2012-06-12 at 14:40 +, avijit.ma...@wipro.com wrote:
 Hi,

 On further debugging I could see the below behaviour:

 1. _gdk_pixbuf_get_module receives the buffer header as:89PNG
 2. But when it fetch the mime_type on that buffer it is getting 
 mime_type:application/octet-stream which should be image/png.

 Due to this there is a type mismatch in mime_type and hence it is returning 
 error with Unrecognized image file format.

 Any idea which could be the reason for this mime_type mismatch?

Gdk-pixbuf optionally uses gio to do mime sniffing, which requires the
shared-mime-info package to be installed. However, the configure script
for gdk-pixbuf explicitly tries to sniff the mimetype for some png data,
and only enables this if that worked.

Are you are building and deploying gdk-pixbuf in different contexts?

___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: gdk_pixbuf_new_from_file_at_scale() returning error saying Unrecognized image file format when loading png files

2012-06-13 Thread Alexander Larsson
On Wed, 2012-06-13 at 10:16 +, avijit.ma...@wipro.com wrote:
 Do I need to export any variable also?

XDG_DATA_DIRS=$WLD/share:/usr/share
You probably also want XDG_CONFIG_DIRS, and obviously things like
LD_LIBRARY_PATH and PATH.

___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


RE: gdk_pixbuf_new_from_file_at_scale() returning error saying Unrecognized image file format when loading png files

2012-06-13 Thread avijit.manna
Hi Alexander,

There was some issue with the setting of XDG_DATA_DIRS which I could resolve. 
Thanks for your valuable inputs.

Regards,
Avijit

From: Alexander Larsson [al...@redhat.com]
Sent: Wednesday, June 13, 2012 5:10 PM
To: Avijit Manna (WT01 - PES)
Cc: gtk-devel-list@gnome.org
Subject: Re: gdk_pixbuf_new_from_file_at_scale() returning error saying 
Unrecognized image file format when loading png files

On Wed, 2012-06-13 at 10:16 +, avijit.ma...@wipro.com wrote:
 Do I need to export any variable also?

XDG_DATA_DIRS=$WLD/share:/usr/share
You probably also want XDG_CONFIG_DIRS, and obviously things like
LD_LIBRARY_PATH and PATH.
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


gdk_pixbuf_new_from_file_at_scale() returning error saying Unrecognized image file format when loading png files

2012-06-12 Thread avijit.manna
Hi,

I have built weston with wayland (wayland 0.85). When I try to run weston 
server it is loaded properly but the cursor is not displayed.

When I dig into more detail and put some logs I could see that following 
functions are getting called:
create_pointer_surfaces()-display_create_surface_from_file()-display_create_egl_image_surface_from_file()-gdk_pixbuf_new_from_file_at_scale().

Now, the function gdk_pixbuf_new_from_file_at_scale() is returning some error 
value with Unrecognized image file format which is resulting in error print 
Error loading pointer image..

I checked the mime database. The mime database is present in /usr/share. But I 
am installing and using my local directory for all my source code. My directory 
is /home/avijit/install/ and there is no mime database installed under 
/home/avijit/install/share. So, do I need to install the mime databse within my 
environment?? If yes, what is the procedure to do so?

I checked the gdk-pixbuf loader in my environment 
(/home/install/lib/gdk-pixbuf/2.10.0/loaders) and it is using an external 
loader. The png loader file is also mentioned in loader.cache. 

Here is the output command of ldd:
ldd libgdk_pixbuf-2.0.so
linux-gate.so.1 =  (0x004e2000)
libgmodule-2.0.so.0 = /home/wipro/install/lib/libgmodule-2.0.so.0 
(0x00cd8000)
libgio-2.0.so.0 = /home/wipro/install/lib/libgio-2.0.so.0 (0x00e3a000)
libgobject-2.0.so.0 = /home/wipro/install/lib/libgobject-2.0.so.0 
(0x00ce9000)
libglib-2.0.so.0 = /home/wipro/install/lib/libglib-2.0.so.0 
(0x0011)
libm.so.6 = /lib/i386-linux-gnu/libm.so.6 (0x003c5000)
libpthread.so.0 = /lib/i386-linux-gnu/libpthread.so.0 (0x00b35000)
libc.so.6 = /lib/i386-linux-gnu/libc.so.6 (0x00981000)
libdl.so.2 = /lib/i386-linux-gnu/libdl.so.2 (0x0060f000)
libz.so.1 = /lib/i386-linux-gnu/libz.so.1 (0x00232000)
libresolv.so.2 = /lib/i386-linux-gnu/libresolv.so.2 (0x00394000)
libffi.so.5 = /home/wipro/install/lib/libffi.so.5 (0x002d1000)
librt.so.1 = /lib/i386-linux-gnu/librt.so.1 (0x00c07000)
/lib/ld-linux.so.2 (0x00247000)
ldd libpixbufloader-png.so 
linux-gate.so.1 =  (0x00319000)
libgdk_pixbuf-2.0.so.0 = 
/home/wipro/install/lib/libgdk_pixbuf-2.0.so.0 (0x0074b000)
libgobject-2.0.so.0 = /home/wipro/install/lib/libgobject-2.0.so.0 
(0x0013)
libglib-2.0.so.0 = /home/wipro/install/lib/libglib-2.0.so.0 
(0x00bd6000)
libpng12.so.0 = /lib/i386-linux-gnu/libpng12.so.0 (0x0089b000)
libpthread.so.0 = /lib/i386-linux-gnu/libpthread.so.0 (0x009da000)
libc.so.6 = /lib/i386-linux-gnu/libc.so.6 (0x0018)
libgmodule-2.0.so.0 = /home/wipro/install/lib/libgmodule-2.0.so.0 
(0x00b0)
libgio-2.0.so.0 = /home/wipro/install/lib/libgio-2.0.so.0 (0x0031a000)
libm.so.6 = /lib/i386-linux-gnu/libm.so.6 (0x0047e000)
libffi.so.5 = /home/wipro/install/lib/libffi.so.5 (0x007b)
librt.so.1 = /lib/i386-linux-gnu/librt.so.1 (0x0011)
libz.so.1 = /lib/i386-linux-gnu/libz.so.1 (0x00119000)
/lib/ld-linux.so.2 (0x00ec8000)
libdl.so.2 = /lib/i386-linux-gnu/libdl.so.2 (0x002fc000)
libresolv.so.2 = /lib/i386-linux-gnu/libresolv.so.2 (0x00b7e000)

Regards,
Avijit
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


RE: gdk_pixbuf_new_from_file_at_scale() returning error saying Unrecognized image file format when loading png files

2012-06-12 Thread avijit.manna
Hi,

On further debugging I could see the below behaviour:

1. _gdk_pixbuf_get_module receives the buffer header as:89PNG
2. But when it fetch the mime_type on that buffer it is getting 
mime_type:application/octet-stream which should be image/png.

Due to this there is a type mismatch in mime_type and hence it is returning 
error with Unrecognized image file format.

Any idea which could be the reason for this mime_type mismatch?

Regards,
Avijit



From: Avijit Manna (WT01 - PES)
Sent: Tuesday, June 12, 2012 4:33 PM
To: gtk-devel-list@gnome.org
Subject: gdk_pixbuf_new_from_file_at_scale() returning error saying 
Unrecognized image file format when loading png files

Hi,

I have built weston with wayland (wayland 0.85). When I try to run weston 
server it is loaded properly but the cursor is not displayed.

When I dig into more detail and put some logs I could see that following 
functions are getting called:
create_pointer_surfaces()-display_create_surface_from_file()-display_create_egl_image_surface_from_file()-gdk_pixbuf_new_from_file_at_scale().

Now, the function gdk_pixbuf_new_from_file_at_scale() is returning some error 
value with Unrecognized image file format which is resulting in error print 
Error loading pointer image..

I checked the mime database. The mime database is present in /usr/share. But I 
am installing and using my local directory for all my source code. My directory 
is /home/avijit/install/ and there is no mime database installed under 
/home/avijit/install/share. So, do I need to install the mime databse within my 
environment?? If yes, what is the procedure to do so?

I checked the gdk-pixbuf loader in my environment 
(/home/install/lib/gdk-pixbuf/2.10.0/loaders) and it is using an external 
loader. The png loader file is also mentioned in loader.cache.

Here is the output command of ldd:
ldd libgdk_pixbuf-2.0.so
linux-gate.so.1 =  (0x004e2000)
libgmodule-2.0.so.0 = /home/wipro/install/lib/libgmodule-2.0.so.0 
(0x00cd8000)
libgio-2.0.so.0 = /home/wipro/install/lib/libgio-2.0.so.0 (0x00e3a000)
libgobject-2.0.so.0 = /home/wipro/install/lib/libgobject-2.0.so.0 
(0x00ce9000)
libglib-2.0.so.0 = /home/wipro/install/lib/libglib-2.0.so.0 
(0x0011)
libm.so.6 = /lib/i386-linux-gnu/libm.so.6 (0x003c5000)
libpthread.so.0 = /lib/i386-linux-gnu/libpthread.so.0 (0x00b35000)
libc.so.6 = /lib/i386-linux-gnu/libc.so.6 (0x00981000)
libdl.so.2 = /lib/i386-linux-gnu/libdl.so.2 (0x0060f000)
libz.so.1 = /lib/i386-linux-gnu/libz.so.1 (0x00232000)
libresolv.so.2 = /lib/i386-linux-gnu/libresolv.so.2 (0x00394000)
libffi.so.5 = /home/wipro/install/lib/libffi.so.5 (0x002d1000)
librt.so.1 = /lib/i386-linux-gnu/librt.so.1 (0x00c07000)
/lib/ld-linux.so.2 (0x00247000)
ldd libpixbufloader-png.so
linux-gate.so.1 =  (0x00319000)
libgdk_pixbuf-2.0.so.0 = 
/home/wipro/install/lib/libgdk_pixbuf-2.0.so.0 (0x0074b000)
libgobject-2.0.so.0 = /home/wipro/install/lib/libgobject-2.0.so.0 
(0x0013)
libglib-2.0.so.0 = /home/wipro/install/lib/libglib-2.0.so.0 
(0x00bd6000)
libpng12.so.0 = /lib/i386-linux-gnu/libpng12.so.0 (0x0089b000)
libpthread.so.0 = /lib/i386-linux-gnu/libpthread.so.0 (0x009da000)
libc.so.6 = /lib/i386-linux-gnu/libc.so.6 (0x0018)
libgmodule-2.0.so.0 = /home/wipro/install/lib/libgmodule-2.0.so.0 
(0x00b0)
libgio-2.0.so.0 = /home/wipro/install/lib/libgio-2.0.so.0 (0x0031a000)
libm.so.6 = /lib/i386-linux-gnu/libm.so.6 (0x0047e000)
libffi.so.5 = /home/wipro/install/lib/libffi.so.5 (0x007b)
librt.so.1 = /lib/i386-linux-gnu/librt.so.1 (0x0011)
libz.so.1 = /lib/i386-linux-gnu/libz.so.1 (0x00119000)
/lib/ld-linux.so.2 (0x00ec8000)
libdl.so.2 = /lib/i386-linux-gnu/libdl.so.2 (0x002fc000)
libresolv.so.2 = /lib/i386-linux-gnu/libresolv.so.2 (0x00b7e000)

Regards,
Avijit
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list