Re: GdkPixbufLoader size-prepared troubles
- From: Alesh Slovak <alesh slovak avasys jp>
- To: Jim Hayward <jimhayward linuxexperience net>
- Cc: gtk-list gnome org
- Subject: Re: GdkPixbufLoader size-prepared troubles
- Date: Wed, 11 Aug 2010 16:13:42 +0900
Hi Jim,
Thanks for taking the time to reply.
On 08/11/2010 02:13 PM, Jim Hayward wrote:
Bluefish uses the size-prepared signal to scale images while they are
being written. The size-prepared signal is only emitted one.
I took a look at the code you provided, but it doesn't seem to be using the
other pixbuf loader signals: area-prepared and area-updated. So it doesn't
directly map to what I am trying to do. However, your code and your comment
below did lead me down the right path.
But when I do this, the image data never makes it into the pixbuf, although the
pixbuf itself appears to get sized correctly.
Are you trying to get the pixbuf from the loader too soon?
This appears to be the case. I was getting the pixbuf from the loader in the
handler for the area-prepared signal, which worked just fine as long as I didn't
call gdk_pixbuf_loader_set_size() in the size-prepared handler.
Getting the pixbuf in the area-updated handler fixes this particular problem. So
now I can get a scaled image out of the pixbuf loader. I am still receiving
multiple size-prepared signals, but it doesn't seem to be having any ill effects
as far as I can tell.
I happened to notice one peculiar thing though, when I call
gdk_pixbuf_loader_set_size(), the area-updated signal is only ever called once,
after the image has finished loading. Thus, I can't update the display to show
the image loading progressively. I guess loading/displaying image data
progressively and scaling at the same time are not supported by GdkPixbufLoader?
Thanks again,
--
Alesh Slovak Linux Team -- AVASYS Corporation
alesh slovak avasys jp http://avasys.jp
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]