Skip to content

JPEG exif properties are being read differently on windows and ubuntu #110

@tudorcarean

Description

@tudorcarean

JPEG exif properties are being read differently on windows and ubuntu. In my case I'm looking for the Orientation tag and I'm only finding it on Windows.

These are the properties read on ubuntu:

[{"Major":1,"Minor":1,"Value":257,"Interoperability":{"TagID":1,"TypeID":3,"Count":1,"Data":"AQE="},"Tag":700001,"IFD":700000,"Name":"JFIFVersion"},{"Value":0,"IsBitField":false,"Interoperability":{"TagID":101,"TypeID":1,"Count":1,"Data":"AA=="},"Tag":700101,"IFD":700000,"Name":"JFIFUnits"},{"Value":1,"Interoperability":{"TagID":102,"TypeID":3,"Count":1,"Data":"AQA="},"Tag":700102,"IFD":700000,"Name":"XDensity"},{"Value":1,"Interoperability":{"TagID":103,"TypeID":3,"Count":1,"Data":"AQA="},"Tag":700103,"IFD":700000,"Name":"YDensity"},{"Value":0,"Interoperability":{"TagID":201,"TypeID":1,"Count":1,"Data":"AA=="},"Tag":700201,"IFD":700000,"Name":"JFIFXThumbnail"},{"Value":0,"Interoperability":{"TagID":202,"TypeID":1,"Count":1,"Data":"AA=="},"Tag":700202,"IFD":700000,"Name":"JFIFYThumbnail"},{"Value":{"Palette":"","PixelData":"","Format":0},"Interoperability":{"TagID":203,"TypeID":1,"Count":0,"Data":""},"Tag":700203,"IFD":700000,"Name":"JFIFThumbnail"}]

And these are the properties read on Windows 10:

[{"Major":1,"Minor":1,"Value":257,"Interoperability":{"TagID":1,"TypeID":3,"Count":1,"Data":"AQE="},"Tag":700001,"IFD":700000,"Name":"JFIFVersion"},{"Value":1,"IsBitField":false,"Interoperability":{"TagID":101,"TypeID":1,"Count":1,"Data":"AQ=="},"Tag":700101,"IFD":700000,"Name":"JFIFUnits"},{"Value":96,"Interoperability":{"TagID":102,"TypeID":3,"Count":1,"Data":"YAA="},"Tag":700102,"IFD":700000,"Name":"XDensity"},{"Value":96,"Interoperability":{"TagID":103,"TypeID":3,"Count":1,"Data":"YAA="},"Tag":700103,"IFD":700000,"Name":"YDensity"},{"Value":0,"Interoperability":{"TagID":201,"TypeID":1,"Count":1,"Data":"AA=="},"Tag":700201,"IFD":700000,"Name":"JFIFXThumbnail"},{"Value":0,"Interoperability":{"TagID":202,"TypeID":1,"Count":1,"Data":"AA=="},"Tag":700202,"IFD":700000,"Name":"JFIFYThumbnail"},{"Value":{"Palette":"","PixelData":"","Format":0},"Interoperability":{"TagID":203,"TypeID":1,"Count":0,"Data":""},"Tag":700203,"IFD":700000,"Name":"JFIFThumbnail"},{"Value":5,"IsBitField":false,"Interoperability":{"TagID":274,"TypeID":3,"Count":1,"Data":"BQA="},"Tag":100274,"IFD":100000,"Name":"Orientation"},{"Value":{"Numerator":96,"Denominator":1,"Error":0.0},"Interoperability":{"TagID":282,"TypeID":5,"Count":1,"Data":"YAAAAAEAAAA="},"Tag":100282,"IFD":100000,"Name":"XResolution"},{"Value":{"Numerator":96,"Denominator":1,"Error":0.0},"Interoperability":{"TagID":283,"TypeID":5,"Count":1,"Data":"YAAAAAEAAAA="},"Tag":100283,"IFD":100000,"Name":"YResolution"},{"Value":2,"IsBitField":false,"Interoperability":{"TagID":296,"TypeID":3,"Count":1,"Data":"AgA="},"Tag":100296,"IFD":100000,"Name":"ResolutionUnit"},{"Value":"paint.net 4.2.16","Encoding":{"BodyName":"utf-8","EncodingName":"Unicode (UTF-8)","HeaderName":"utf-8","WebName":"utf-8","WindowsCodePage":1200,"IsBrowserDisplay":true,"IsBrowserSave":true,"IsMailNewsDisplay":true,"IsMailNewsSave":true,"IsSingleByte":false,"EncoderFallback":{"DefaultString":"�","MaxCharCount":1},"DecoderFallback":{"DefaultString":"�","MaxCharCount":1},"IsReadOnly":true,"CodePage":65001},"Interoperability":{"TagID":305,"TypeID":2,"Count":17,"Data":"cGFpbnQubmV0IDQuMi4xNgA="},"Tag":100305,"IFD":100000,"Name":"Software"}]

This is the jpeg I used for testing:
exif-rotated-image

I'm playing with it on a net 6.0 project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions