>>>>> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes:
Georg> We have no format information for a file if Georg> getFormatFromContents() does not recognize the file format. Georg> This was no problem in the old days when formats and extenions Georg> were mixed, but we currently need a format even if the default Georg> converter is used. The patch removes this requirement by adding Georg> some hardcoded decisions if the format is unknown: Convert to Georg> ppm for on-screen display, assume bitmap data (png) in Georg> insetgraphics for determining the target format, and simply Georg> leave out the format prefix when calling convert, i. e. don't Georg> call I do not like this png hardcoding thing... >> Wouldn't it be easier for now to just recognize XCF? Georg> I don't know how easy XCF files can be recognized in Georg> getFormatFromContents(). /etc/magic says: # XCF: file(1) magic for the XCF image format used in the GIMP developed # by Spencer Kimball and Peter Mattis # ('Bucky' LaDieu, [EMAIL PROTECTED]) # (Recognition of versions: Simon Budig <[EMAIL PROTECTED]>) 0 string gimp\ xcf GIMP XCF image data, >9 string file version 0, >9 string v version >>10 string >\0 %s, >14 belong x %lu x >18 belong x %lu, >22 belong 0 RGB Color >22 belong 1 Greyscale >22 belong 2 Indexed Color >22 belong >2 Unknown Image Type. So the file starts with "gimp xcf". Georg> And of course the problem would only be fixed for XCF, this Georg> patch fixes it for all unknown formats. Yes, but in a way I do not like much. Georg> In the long run we should replace getFormatFromContents() by a Georg> mimetype-based solution, maybe using file --mime or other Georg> existing file type databases. Agreed. JMarc