[ correct description of the patch ]

>The only problem I see with this patch are badly written file_plug_ins 
>that don't provide a magic header but a bunch of extensions since the 
>patch would significantly enhance the possibility that the wrong loader
>is used.

Grepping for gimp_register_load_handler, I get the following matches besides

mpeg.c: gimp_register_load_handler ("file_mpeg_load", "mpg,mpeg", "");
bz2.c: gimp_register_load_handler ("file_bz2_load", "xcf.bz2,bz2,xcfbz2", "");
gicon.c: gimp_register_load_handler ("file_gicon_load", "ico", "");
pix.c: gimp_register_load_handler ("file_pix_load", "pix,matte,mask,alpha,als",
psd.c: gimp_register_load_handler ("file_psd_load", "psd", "");
url.c: gimp_register_load_handler ("file_url_load", "", "http:,ftp:");
xbm.c: gimp_register_load_handler ("file_xbm_load", "xbm,icon,bitmap", "");

Of these, mpeg, bz2, gicon, and psd have perfectly good magic numbers,
so fixing these are easy. I'll whip up a patch that does this.

The Alias/Wavefront PIX format has no good magic header. The extensions
pix,matte,mask,alpha,als are registred, which is a bit too much. Most of
these are too generic to be of any use; I'd say keep the ".pix" and drop the

url is a prefix "format" and not really a problem.

xbm is almost identifiable (you could try matching "/*" not followed by " XPM",
or "#define"), but I don't know if the pattern language allows it.

Reply via email to