Re: [Tracker] Updated To do for next version
- From: René Stadler <mail renestadler de>
- To: Jamie McCracken <jamiemcc blueyonder co uk>
- Cc: Tracker List <tracker-list gnome org>
- Subject: Re: [Tracker] Updated To do for next version
- Date: Tue, 03 Oct 2006 15:22:53 +0200
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.
Regards, Renà Stadler.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]