Re: [Tracker] Updated To do for next version



On 10/3/06, Jamie McCracken <jamiemcc blueyonder co uk> wrote:
Jamie McCracken wrote:
> Edward Duffy wrote:
>> On 10/3/06, Jamie McCracken <jamiemcc blueyonder co uk> wrote:
>>> Edward Duffy wrote:
>>>> On 10/3/06, Jamie McCracken <jamiemcc blueyonder co uk> wrote:
>>>>> Edward Duffy wrote:
>>>>>> patch attached.
>>>>>>
>>>>> great but what about comments in gif files?
>>>>>
>>>>> Also whats the problem  with animated gifs? Do they output multiple
>>>>> heights and widths?
>>>> yeah...eg.
>>>> 150x10773x9571x9671x10073x10073x9571x9671x10073x10073x9571x9...
>>>>> cant we use format "W%w\\nH%h\\nC%c"
>>>>>
>>>>> so you can g_strsplit on \n and tell the type by looking at the first
>>>>> char (or whatever else works)
>>>>>
>>>> yeah..that'll probably work... gimme a sec.
>>> oh I dont know if the comment can contain a newline char so best to make
>>> sure you handle that too (unless you know otherwise)
>>>
>> so demanding... ;)
>
> yeah sorry but important to get it right now before it bites us in the
> arse later :)
>
>> Ok, here it is.  Wasn't sure if tracker handled newlines in strings,
>> so I called g_strescape on it.  Go ahead and remove it if it's not
>> nessasary.  But it'll look like this:
>>
>> Image.Comments=Created with The GIMP\n\nBut with a newline;
>> Image.Width=640;
>> Image.Height=480;
>>
>
> will this work with animated gifs though? (i dont have any to test!)
>
> from what you said above it does not look like it?
>
>
I don't loop throughall  the frame's results, I use just the first
frame, which is also the biggest.  So, width and height will be
correct...on the off chance that there's a comment on some other frame
than the first, it will not catch that.

I'm attaching an anigif so you can test the dimensions.


FWIW, take a look at how tracker-extract extracts metadata with
libextractor - you might want to use a similiar format (eg
Image.Height=10;\nImage.Width=10\n) for the format string.

(GHashtable will overwrite values with the same key so it should be okay
for animated gifs)

--
Mr Jamie McCracken
http://jamiemcc.livejournal.com/

Attachment: work135.gif
Description: GIF image



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