[Mono-list] MonoMac System.Drawing.Image.GetPropertyItem(0x5100)

Steven Houben stvnhouben at gmail.com
Sun Jul 21 23:44:04 UTC 2013

Recently, I was trying to answer another StackOverflow question about
loading the frames (Bitmap and duration) of animated GIFs. The code can be
found on pastebin:http://pastebin.com/Y6iUGDX9.

While doing additional tests on this code before moving it into my dev
library, I noticed that there is a problem with this line of code:

//Get the times stored in the gif
//PropertyTagFrameDelay ((PROPID) 0x5100) comes from gdiplusimaging.h
//More info on
var times = img.GetPropertyItem(0x5100).Value;

When running this on Windows .Net, the array is of the same size as the
amount of frames in the animated GIF and filled with the durations of the
frames. On MonoMac however, this line of code always returns a byte[4] with
only the first value set. I tested this for 10 different GIF's and the
result is always:



Looking at the Mono System.Drawing.Image source code (
the length seem to be set in this method:

status = GDIPlus.GdipGetPropertyItemSize (nativeObject, propid,out

However, I don't really see any problems, not with the source as with my
implementation. Am I missing something or is this a bug?

I also posted this on StackOverflow (

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20130722/ab1a11e9/attachment.html>

More information about the Mono-list mailing list