Re: GtkPixbuf from Char buffer



arto,

have you considered caching the downloaded file to disk and reading from
there using the standard function?

This would give you the obvious benefit of allowing offline usage and faster
requerying.
There isn't an infinite amount of memory available and having to download
images everytime could cause user angst.

I believe /tmp is mapped to real memory and not the flash drive, so would
not cause real problems and wouldn't be much slower  (someone can confirm
this?)

Even though it may require a little bit more time to organise a cache file
plan, it may be worth it in the end?

Gary (lcuk on #maemo)

On Thu, Oct 16, 2008 at 3:12 PM, Arto Karppinen <
arto karppinen mail suomi net> wrote:


Hi, were developing an application which is supposed to show user images
downloaded from web server using xmlrpc. The problem is that we cant
quite figure out how to create a pixbuf from a buffer which contains the
RAW contents of a file.

Functions like:

   gdk_pixbuf_new_from_data
   gdk_pixbuf_new_from_inline
   gdk_pixbuf_from_pixdata

all seem to expect the image to be in some particular format already,
while what we need is more like gdk_pixbuf_new_from_file() which is able
to autodetect everything and just read the file.

All information that our application has about the image are:
 - Name of file.
 - Size of file.
 - Contents of file.

--
Arto Karppinen
------------------------------
arto karppinen iki fi
_______________________________________________
maemo-developers mailing list
maemo-developers maemo org
https://lists.maemo.org/mailman/listinfo/maemo-developers




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