Closed kingvhit closed 4 years ago
Are you trying to read existing Exif data from a file and obtain it as a byte[]
? Or are you trying to construct your own Exif data programmatically and save it out in Exif format?
If you're reading Exif from JPEG files it should be straightforward to obtain the byte arrays via JpegSegmentReader
. You'll want to use JpegSegmentType.APP1
which usually contains Exif data. You may need to trim off the Exif\0\0
preamble to get the actual Exif data.
Hi @drewnoakes, I want to extract all the Exif data blocks into a binary file like data.exif
.
This file will begin from Exif\0\0
-> end of Exif block.
Also, I know the beginning of the EXIF data block is start from Exif\0\0
but I didn't know the ending of that block.
@drewnoakes : hi, any help? I have to try many methods but some of them not works.
Sorry I missed this. Are you trying to read from JPEG? Please provide more information and I'll reopen this if you're still stuck. In general it's better to ask support questions on Stack Overflow, tagging them with metadata-extractor
.
hi, I also want to use addExifData to add eixf info to heic with multiple images ,but I do not know how to form the input parameters "byte[] exifData", same with you, do you have any solusions? looking forward to your replay,thanks!
@s3abiscuit @kingvhit Did you find any workaround? I need this too in one of my project.
Hi,
Thank you very much for your library, it's very nice, easy to use. But I have a question about the metadata.
I have a project that needs an input of ExifData block following by the TIFF Header and need pass a byte array of Exifdata into this method ->
exifData
parameterIn fact, I think your library is parsing the data from the Exif data block and then extract it into the readable data and convert it to
Tag
object.But, now I want to get the Exif Data block as a byte array or write all metadata into the binary file. Can I do it in this library?
My idea is :
Solution 1:
"Exif\0\0"
as the first of sequence. Then: I need to put some Tag data into the next sequence, but I don't know and not clear is it work or not. By usingdirectory.getByteArray(TagName)
to get data of its directory and then put it into sequence until the end of all tag.Solution 2: Get byte array data beginning of
"Exif\0\0"
and ending of Exif Data Block.Do you have any suggestions? Or how can I write the EXIF data into the HEIF file? Some library like Nokia HEIF is using Exif Data Block as byte array is a parameter input, so that why I need the Exif data as a byte array.