
"Make sure the path to the image file is valid.") PropItem.Id.ToString("x"), font1, blackBrush, X, Y) SolidBrush blackBrush = new SolidBrush(Color.Black) įoreach ( PropertyItem propItem in propItems )Ĭount.ToString(), font1, blackBrush, X, Y) PropertyItem propItems = theImage.PropertyItems Image theImage = new Bitmap("c:\\fakePhoto.jpg") Private void ExtractMetaData(PaintEventArgs e) "Make sure the path to the image file is valid." ) PropertyItem^ propItem = safe_cast(myEnum->Current) Į->Graphics->DrawString( String::Format( "Property Item bytes", propItem->Len ), font1, blackBrush, (float)X, (float)Y ) System::Collections::IEnumerator^ myEnum = propItems->GetEnumerator() For each PropertyItem in the array, display the id, SolidBrush^ blackBrush = gcnew SolidBrush( Color::Black ) System::Drawing::Font^ font1 = gcnew System::Drawing::Font( "Arial",10 ) Get the PropertyItems property from image.Īrray^propItems = theImage->PropertyItems Image^ theImage = gcnew Bitmap( "c:\\fakePhoto.jpg" ) Void ExtractMetaData( PaintEventArgs^ e )

Call the ExtractMetaData method when handling the form's Paint event, passing e as PaintEventArgs.
#SET DIM PROPERTIES CURRENT AUTOCAD 2005 CODE#
Paste the code into the form and change the path to fakePhoto.jpg to point to an image file on your system. This example is designed to be used in a Windows Form that imports the namespace.
#SET DIM PROPERTIES CURRENT AUTOCAD 2005 HOW TO#
The following code example demonstrates how to read and display the metadata in an image file using the PropertyItem class and the Image.PropertyItems property.
