Re: [Tracker] Updated To do for next version
- From: Jamie McCracken <jamiemcc blueyonder co uk>
- To: Renà Stadler <mail renestadler de>
- Cc: Tracker List <tracker-list gnome org>
- Subject: Re: [Tracker] Updated To do for next version
- Date: Tue, 03 Oct 2006 14:32:44 +0100
Renà Stadler wrote:
Am Dienstag, den 03.10.2006, 12:50 +0100 schrieb Jamie McCracken:
[...]
I think for image files (gif, tiff and others) we might want to use
imageMagick's identify command to get the dimensions (especially if
libexif and libpng are not present as we can fallback on this too)
EG
identify -format "%wx%h" sample.jpg
2112x2720
this will allow us to get the Image.Width and Image.Height by parsing
stdout. We also dont need a hard dependency on ImageMagicks stuff.
It can also be used to get comments embedded and other stuff like
resolutions in image :
identify -format "%c" sample.jpg
[...]
Using identify might be a bad idea. Last time I checked, it had the bad
habit of performing all of its extraction and analysis capabilities
(counting colors etc.) even if you just request things as simple as the
geometry or the embedded comment (which should become available after
just parsing a few bytes of most image formats). That is, it is very
slow/wastes CPU cycles. For getting the geometry, I found that it is
much faster and efficient to use a GdkPixbufLoader and connect to the
"size-prepared" signal. Not that I think this is the perfect solution
either (I think GdkPixbuf has already allocated memory to hold the
complete decoded image when it emits the signal), but it tells about the
deficiencies of Imagemagick.
yes you might be right there (identify does seem a little slow on large
images)
We cant depend on GDK either.
I only suggested it as a fallback for images not supported by libexif or
libpng (which means stuff like tiff, gif, xpm et all). If we have time
we can extract libextractor's plugins for these other formats which
should be more efficient.
--
Mr Jamie McCracken
http://jamiemcc.livejournal.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]