I have specific kind of JPEG files, which contain information in the "User Comment" propertie.
The "User Comment" propertie has the ID of 37510.
All I want to do is:
a) Get the propertie as text
b) Modify the propertie
c) Set the modified propertie
This reads the propertie I want.
'Load the Imgae from the file system.
Dim image As Image = System.Drawing.Image.FromFile("Real_VRX_Image.jpg")
'The specific propertie item.
Dim propItem As PropertyItem = image.GetPropertyItem(37510)
This do not work, because the "User Comment" seems to be an byte array.
'Display the Text of the "User Comment" (does not work...)
MessageBox.Show(propItem.Value.ToString)
I have tried to use this function, to convert the byte array to a string, which I can edit - but it just created garbage.
Public Function ByteArrayToString(ByRef Barr() As Byte) As String
Return Convert.ToBase64String(Barr)
End Function
Thx