• # Bug?

    Posté par . En réponse au journal hachoir-metadata cherche des testeurs. Évalué à 2.

    Bonjour haypo

    j'ai testé hachoir sur divers fichiers qui me passaient sous la main, et j'ai repéré quelques "bugs" (si tu veux les fichiers en question, tu n'as qu'à demander):

    Sur un jpeg, le "manufacturer" donné par hachoir est différent de celui d'exif, et quelques info manquent:

    $ ./hachoir-metadata --level=9 --verbose ~/doc/photos/Tom_Rhodamine6G/02045649.jpg
    [warn] Warning: padding /exif/content/ifd[1]/entry[11]/padding content don't look normal (invalid pattern at byte 0)!
    [warn] [Autofix] Delete /exif/content/ifd[1]/entry[15]/tag (too large)
    [warn] [Autofix] Delete /exif/content/ifd[1]/entry[15] (too large)
    Metadata:
    - Image width: 800
    - Image height: 600
    - Bits/pixel: 24
    - Pixel format: YCbCr
    - Creation date: 00:01:02 04:54:49
    - Camera model: -L1-2M H
    - Camera manufacturer: konDS
    - Compression: JPEG
    - Producer: 0.0701.3720.05090520
    - MIME type: image/jpeg
    - Endian: Big endian

    $ exif ~/doc/photos/Tom_Rhodamine6G/02045649.jpg
    (...)
    Constructeur |Nikon
    Logiciel |310.0701.3720.050905
    Temps d'exposition |1/2 sec.
    ExposureProgram |Programme normal
    Version d'exif |Unknown Exif Version
    FlashPixVersion |Unknown FlashPix Version
    Espace des couleurs |sRGB
    PixelXDimension |800
    PixelYDimension |600
    (...)


    Un truc bizarre (mais très facile à corriger je suppose): sur une autre image, l'extension était .JPG, et hachoir a essayé plusieurs parseurs avant de choisir EXIF, alors qu'avec la même image avec l'extension .jpg, il prend le bon parseur tout de suite.

    Sur les images TIFF, tiffinfo me donne plus d'info que hachoir:

    $ ./hachoir-metadata --level=9 --verbose ~/PhD/data/image_intensifier/20oct2006/1st\ test/k00001.tif
    Metadata:
    - Image width: 496
    - Image width: 480
    - MIME type: image/tiff
    - Endian: Little endian

    $ tiffinfo ~/PhD/data/image_intensifier/20oct2006/1st\ test/k00001.tif
    TIFF Directory at offset 0x8 (8)
    Subfile Type: reduced-resolution image (1 = 0x1)
    Image Width: 496 Image Length: 480
    Resolution: 0.330667, 0.32 pixels/inch
    Bits/Sample: 8
    Compression Scheme: None
    Photometric Interpretation: min-is-black
    Samples/Pixel: 1
    Rows/Strip: 480
    Planar Configuration: single image plane


    une autre:

    $ ./hachoir-metadata --level=9 --verbose ~/doc/PhD/EBCCD\ Datas/7.tif
    Metadata:
    - Image width: 512
    - MIME type: image/tiff
    - Endian: Little endian

    $ tiffinfo ~/doc/PhD/EBCCD\ Datas/7.tif
    TIFF Directory at offset 0x8 (8)
    Subfile Type: (0 = 0x0)
    Image Width: 512 Image Length: 512
    Resolution: 1, 1 (unitless)
    Bits/Sample: 16
    Compression Scheme: None
    Photometric Interpretation: min-is-black
    FillOrder: msb-to-lsb
    Orientation: row 0 top, col 0 lhs
    Samples/Pixel: 1
    Rows/Strip: 10
    Planar Configuration: single image plane
    ImageDescription: [Application],Date="04-07-2003",Time="14:04:05",Software="HiPic",Application=1,ApplicationTitle="High Performance Image Control System",SoftwareVersion="6.4.0 pf2",SoftwareDate="31.01.2003"
    [Camera],SSP=S,SAG=S,SMD=N,SHA=F,SVO=0,SVW=1018,SVB=2,SHB=2,SPX=2,SOP=I,AET=20ms,ASH=A,AMD=I,ATP=N,ATN=1,ACN=1,CSW=O,PSW=O,SHC=F,TST=-25,CEG=0,CEO=0,CEC=F,IGC=O,IIG=12,Temperature=-25.1,CVG=235,CVO=187,CameraName="C7190-10",Type=1,SubType=18
    [Acquisition],NrExposure=1,NrTrigger=0,ExposureTime=20ms,AcqMode=2,DataType=3,DataTypeOfSingleImage=3,ShadingCorr=0,CurveCorr=0,areSource="0,0,512,512",areGRBScan="0,0,512,512",pntOrigCh="0,0",pntOrigFB="0,0",pntBinning="1,1",BytesPerPixel=2,BacksubCorr=0
    [Grabber],ConfigFile="C:\Program Files\Hipic\HiPic640\PCDig.txt",Type=3,SubType=1,ComPort=1
    [DisplayLUT],EntrySize=3,LowerValue=1442,UpperValue=4096,BitRange="12 bit",Color=3,LUTType=0,Gamma=1,First812OvlCol=1,Lut16xShift=0,Lut16xOvlVal=32767
    [Scaling],ScalingXType=1,ScalingXScale=1,ScalingXUnit="No unit",ScalingXScalingFile="No scaling",ScalingYType=1,ScalingYScale=1,ScalingYUnit="No unit",ScalingYScalingFile="No scaling"[Comment],UserComment=""
    Software: HiPic 6.4.0 pf2
    DateTime: .&checktime(2003,04,07,':') 14:04:58
    Artist: Copyright Hamamatsu GmbH, 2002


    Voilivoilou, j'espère que ça peut t'aider! Encore bravo et merci pour Hachoir.