vb.net - Get image file name from PictureBox control -
i have image in folder able display onto picturebox in following manner:
picturebox1.image = nothing 'clearing picturebox1 dim bmphotos new bitmap("c:\photos\imagename.gif") picturebox1.image = bmphotos
i obtain additional information image. image title. possible in .net?
thank you.
if want read image metadata such title, author, camera make, model, etc., stored in image header exif.
they can retrieved using propertyitems. every property tag identified hexadecimal value , can find them here , here.
'create image object. dim img image = image.fromfile("c:\ashish\apple.jpg") 'get propertyitems property image. dim propitems propertyitem() = img.propertyitems dim encoding new system.text.asciiencoding() dim title string = encoding.getstring(propitems(0).value) dim manufacturer string = encoding.getstring(propitems(1).value)
a simple implementation read exif metadata available here.
Comments
Post a Comment