• [^] # Re: Transfert via smartphone <-> PC

    Posté par . En réponse au message Récupérer des Fichiers JPEG endommagés.. Évalué à 3.

    En voyant ça, je me suis dit qu'aller voir à quoi pouvait ressembler le header d'un fichier jpeg pourrait permettre d'y voir plus clair (oui, j'allais te conseiller de regarder tes fichiers avec un éditeur hexa :p) et du coup j'ai fait comme d'habitude: recherche wikipedia francophone rapide, comme souvent article peu inspirant donc bascule sur l'anglais, ctrl+f sur header... et je suis arrivé sur une information intéressante, qui pourrait être liée à ton problème:

    Image files that employ JPEG compression are commonly called "JPEG files", and are stored in variants of the JIF image format. Most image capture devices (such as digital cameras) that output JPEG are actually creating files in the Exif format, the format that the camera industry has standardized on for metadata interchange. On the other hand, since the Exif standard does not allow color profiles, most image editing software stores JPEG in JFIF format, and also include the APP1 segment from the Exif file to include the metadata in an almost-compliant way; the JFIF standard is interpreted somewhat flexibly.[18]

    Strictly speaking, the JFIF and Exif standards are incompatible because each specifies that its marker segment (APP0 or APP1, respectively) appear first. In practice, most JPEG files contain a JFIF marker segment that precedes the Exif header. This allows older readers to correctly handle the older format JFIF segment, while newer readers also decode the following Exif segment, being less strict about requiring it to appear first.

    Je traduit les zones avec emphase (qui est de moi, et je rajoute de l'emphase dans la trad pour les points vraiment intéressants):

    Les fichiers d'images qui emploient la compression JPEG sont habituellement appelés "fichier JPEG", et sont stockés dans des variantes du format JIF

    les standards JFIF et Exif sont incompatibles

    En pratique, la plupart des fichiers JPEG contiennent un segment marqueur JFIF qui précède l'en-tête Exif

    Bref, il semblerait qu'il existe 2 formats distincts qui ne sont pas compatibles, mais qu'en général un contournement de problème soit utilisé.
    Si ça se trouve, tu tombes dans un cas ou ce hack n'est pas utilisé, et ton problème pourrait venir de la?

    Je précise de suite: je ne suis pas un expert du sujet, j'ai juste un peu de temps à perdre et me suis dit que tant qu'a faire autant prendre un sujet intéressant dans le forum et voir un peu ce qu'il peut y avoir derrière :)