TGA support for KDE

Matthias Welwarsky matze at stud.fbi.fh-darmstadt.de
Mon Jan 27 08:41:46 GMT 2003


On Monday 27 January 2003 03:01, Malte Starostik wrote:
> On Sunday 26 January 2003 22:37, Dominik Seichter wrote:
> > RLE compressed TGA files start with 0x00 0x00 0x0a and I use the
> > following header to match them: ^\x01\x01\x0a
> > Uncommpressed TGA images start with 0x00 0x00 0x02, but I can't match
> > them using the header ^\x01\x01\x02 . What is wrong with this reg
> > expression?
>
> Do you have a current version of kdelibs/kimgio/ico.kimgio?
> I recently changed the Header regex for .ico/.cur files from \001\001 to
> \001\001[\001|\002]\001 so if you still have the old version, it might
> match on TGA. Grr, doesn't it suck that both TGA and ICO/CUR have no real
> "magic" header? A .cur (Windows cursor, essentially the same as .ico) file
> starts with 0x00 0x00 0x02 0x00, so any TGA with that start will still be
> considered a CUR file if the ico/cur reader is registered first and all
> .cur files will be treated like a TGA if that reader is registered first.
>
> -Malte

Couldn't this be solved by using a "longest match" strategy instead of a 
"first match"? I mean, collect "Header" lines from all registered codecs and 
consider the more exact (meaning: the longer) ones first?

regards,
	matze

-- 
Matthias Welwarsky
Fachschaft Informatik FH Darmstadt
Email: matze at stud.fbi.fh-darmstadt.de

"all software sucks equally, but some software is more equal"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20030127/83186e9d/attachment.sig>


More information about the kde-core-devel mailing list