Hello forum
I am using ExifInterface4a (https://www.b4x.com/android/forum/threads/android-support-exifinterface.74629/) for getting the image orientation.
While i am getting right exif data with the stock gallery app i can't get the same exif data with the ExifInterface library.
Here is my code:
What's wrong?
This is what i get:
I am using ExifInterface4a (https://www.b4x.com/android/forum/threads/android-support-exifinterface.74629/) for getting the image orientation.
While i am getting right exif data with the stock gallery app i can't get the same exif data with the ExifInterface library.
Here is my code:
B4X:
Dim input As InputStream = File.OpenInput(dir, FileName) 'https://www.b4x.com/android/forum/threads/get-the-path-to-media-files-returned-from-contentchooser.39313/page-2
Dim Out As OutputStream
Out = File.OpenOutput(File.DirInternal, "Original.jpg", False)
File.Copy2(input, Out)
Out.Close
input.Close
Dim filePath As String
filePath = File.Combine(File.DirInternal, "Original.jpg")
exif.Initialize("",filePath)
Log("Exif Data: " & exif.GetAllAttributes)
What's wrong?
This is what i get:
B4X:
Exif Data: (MyMap) {DateTime=null, ExposureTime=null, Flash=null, FocalLength=null, GPSAltitude=null, GPSAltitudeRef=null, GPSDateStamp=null, GPSLatitude=null, GPSLatitudeRef=null, GPSLongitude=null, GPSLongitudeRef=null, GPSProcessingMethod=null, GPSTimeStamp=null, ImageLength=0, ImageWidth=0, Make=null, Model=null, Orientation=0, WhiteBalance=null, Artist=null, BitsPerSample=null, BrightnessValue=null, CFAPattern=null, ColorSpace=null, ComponentsConfiguration=null, CompressedBitsPerPixel=null, Compression=null, Contrast=null, Copyright=null, CustomRendered=null, DateTimeDigitized=null, DateTimeOriginal=null, DeviceSettingDescription=null, DigitalZoomRatio=null, ExifVersion=null, ExposureBiasValue=null, ExposureIndex=null, ExposureMode=null, ExposureProgram=null, FileSource=null, FlashpixVersion=null, FlashEnergy=null, FocalLengthIn35mmFilm=null, FocalPlaneResolutionUnit=null, FocalPlaneXResolution=null, FocalPlaneYResolution=null, FNumber=null, GainControl=null, GPSAreaInformation=null, GPSDestBearing=null, GPSDestBearingRef=null, GPSDestDistance=null, GPSDestDistanceRef=null, GPSDestLatitude=null, GPSDestLatitudeRef=null, GPSDestLongitude=null, GPSDestLongitudeRef=null, GPSDifferential=null, GPSDOP=null, GPSImgDirection=null, GPSImgDirectionRef=null, GPSMapDatum=null, GPSMeasureMode=null, GPSSatellites=null, GPSSpeed=null, GPSSpeedRef=null, GPSStatus=null, GPSTrack=null, GPSTrackRef=null, GPSVersionID=null, ImageDescription=null, ImageUniqueID=null, InteroperabilityIndex=null, ISOSpeedRatings=null, JPEGInterchangeFormat=null, JPEGInterchangeFormatLength=null, LightSource=0, MakerNote=null, MaxApertureValue=null, MeteringMode=null, OECF=null, PhotometricInterpretation=null, PixelXDimension=null, PixelYDimension=null, PlanarConfiguration=null, PrimaryChromaticities=null, ReferenceBlackWhite=null, RelatedSoundFile=null, ResolutionUnit=null, RowsPerStrip=null, SamplesPerPixel=null, Saturation=null, SceneCaptureType=null, SceneType=null, SensingMethod=null, Sharpness=null, ShutterSpeedValue=null, Software=null, SpatialFrequencyResponse=null, SpectralSensitivity=null, StripByteCounts=null, StripOffsets=null, SubjectArea=null, SubjectDistance=null, SubjectDistanceRange=null, SubjectLocation=null, ApertureValue=null, SubSecTimeDigitized=null, SubSecTimeOriginal=null, ThumbnailImageLength=null, ThumbnailImageWidth=null, TransferFunction=null, UserComment=null, WhitePoint=null, XResolution=null, YCbCrCoefficients=null, YCbCrPositioning=null, YCbCrSubSampling=null, YResolution=null}
[Code]