.net - Adding Custom Metadata to TIFF file -
i trying encode , digitally sign tiff image. use psicom.dll (library provided medicare australia encode , sign images). far good. trying is, add metadata information tiff file (eg timestamp before file encoded). @ moment being done appending timestamp information end of file, , removing information appended when image decoded. here pseudocode this:
' read image byte array file.setattributes(imagepath, fileattributes.normal) dim temp() byte = system.io.file.readallbytes(imagepath) dim datekey() byte = encoding.ascii.getbytes((datetime.parse(datetime.now).tostring("dd/mm/yyyy hh:mm:ss tt") ' copy data array dim data() byte = new byte(((temp.length + (datekey.length + 1))) - 1) {} temp.copyto(data, 0) 'temp has timestamp.
this rather cumbersome @ decoding end, because 1 needs know exact number bytes remove off end of file. not know tiff files, , haven't worked on image files before, reading found 1 use custom tags within tiff file. can please throw light on this. ideally add metadata / custom tags in key-value pair format, when have remove information, can remove entire key-value pair or set values null. , importantly want using .net , cannot use third party dlls such libtiff.net. regards,
laavanya lokkanathan
Comments
Post a Comment