Re: Gdk::PixbufFormat



Am Sun, 2 Dec 2007 09:55:53 +0100 schrieb Andreas Volz:

> Am Sat, 1 Dec 2007 22:12:44 +0100 schrieb Andreas Volz:
> 
> > Hello,
> > 
> > I need to find out the format of a file that I display with Pixbuf.
> > Gdk::PixbufFormat looks good, but I've no idea how to use it. Could
> > anyone tell me how to use it?
> 
> As background info why I need this:
> 
> in the normal case I use Gdk::Pixbuf::create_from_file() to load
> images into my application. But in a special case I load images from
> a cache directory that has only names like:
> 
> 1183526716  1719181811  2285749610  3283493605  3889420936  617060752
> 1206182082  1726820500  2369683778  334370454   3917029890  699709512
> 1287426164  173772501   2458688180  3359494770  4089503340  705928064
> ...
> 
> But if I give that names to Gdk::Pixbuf::create_from_file() no files
> are loaded. Does Pixbuf really only use the file extensions to get the
> format? Isn't is possible to auto detect it from the content?
> 
> Another idea may be to give the "real" name as detect option to
> Pixbuf, but the filename to load the file. I've this name, because I
> saved it to a database.
> 
> Or would be possible to rename a cache file to it's "real" .jpeg name
> before loading and rename it back after loading. But I don't like
> this.
> 
> Perhaps it's possible to inherit a class from Gdk::Pixbuf and access
> some protected data to do what I like.

Forget this question. I found a solution for my problem.

regards
Andreas


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