Offset to a block of GPS property items. Property items whose tags have the
PropertyTagGps are stored in the GPS block. The GPS property items are
the EXIF specification. GDI+ uses this tag to locate GPS information, but
I have not tried the GPS tags. I know they are specific for the image type
(e.g., gif, jpg, tiff, etc.). Some of the tags are written automatically by
I suggest that you try to write a PropertyItem with a c++ test case.
"Roger Beniot" <roger_beniot@yahoo.com> wrote in message
news:1127958349.910369.292090@o13g2000cwo.googlegroups.com...
> Michael... what documentation are you looking at (provide a link)?...
>
> Everything I've read says it is supported:
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdicpp/GDIPlus/GDIPlusreference/constants/imagepropertytagconstants/propertyitemdescriptions.asp
>
> Plus it shouldn't make any difference... I should be able to add any
> custom/non-supported property and have it correctly saved to the file.
> I have tried adding a variety of different image properties (copyright,
> description, artist, etc) and none of those save either.
>
> -roger
>
> Michael Phillips, Jr. wrote:
>> The MSDN documentation states that PropertyTagGpsIFD is not exposed by
>> gdi+
>> for public use.
>>
>>
>> "Roger Beniot" <roger_beniot@yahoo.com> wrote in message
>> news:1127942167.859674.189360@z14g2000cwz.googlegroups.com...
>> >I am trying to add EXIF properties to my JPEG pictures taken w/ a Canon
>> > digital camera. The fields I want to add related to GPS data.
>> >
>> > I have tried the suggestions listed at:
>> >
http://www.pixvillage.com/blogs/devblog/archive/2005/03/27/176.aspx >> >
>> > I have tried the following:
>> > 1) adding an image w/ PropertyItems to the assembly as a resource,
>> > loading the resource, getting a property item, changing the property
>> > item values, setting the property item to my Image and saving (using
>> > the various implementations of Image.Save)
>> >
>> > 2) using reflection to get the PropertyItem constructor (yes not the
>> > recommneded way but worth a try).
>> >
>> > 3) just loading an image w/ PropertyItems, getting a property item,
>> > changing the property item values, setting the property item on my
>> > image and saving the image.
>> >
>> > 4) also tried getting the JPEG image encoder and using it
>> >
>> > In all cases the new property item is added but when I save the image
>> > and then enumerator through the PropertyItems my new property is not
>> > there.
>> >
>> > I have tried saving as the original file, a different file name, etc.
>> >
>> >
>> > Here is a very simple snip of what I've tried doing (C#):
>> >
>> > Bitmap bmp = (Bitmap) Bitmap.FromFile(BASE_FILE);
>> >
>> > PropertyItem pi = bmp.GetPropertyItem(0x10f);
>> > pi.Id = 0x8825;
>> > pi.Type = 2;
>> > pi.Value = data;
>> > pi.Len = data.Length;
>> >
>> > bmp.SetPropertyItem(pi);
>> >
>> > PropertyItem propItem = bmp.GetPropertyItem(0x8825);
>> >
>> > bmp.Save(NEW_FILE2);
>> >
>> >
>> > Thanks,
>> > Roger
>> >
>