Skip to content

Instantly share code, notes, and snippets.

@migueldeicaza
Created July 18, 2017 13:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save migueldeicaza/e8feae5c7322d8883f99f3f05e1efb2e to your computer and use it in GitHub Desktop.
Save migueldeicaza/e8feae5c7322d8883f99f3f05e1efb2e to your computer and use it in GitHub Desktop.
diff --git a/src/CoreGraphics/CGImageProperties.cs b/src/CoreGraphics/CGImageProperties.cs
index b696f706..a930c866 100644
--- a/src/CoreGraphics/CGImageProperties.cs
+++ b/src/CoreGraphics/CGImageProperties.cs
@@ -260,6 +260,13 @@ namespace XamCore.CoreGraphics {
}
}
+ public CGImagePropertiesGif Gif {
+ get {
+ var dict = GetNSDictionary (Keys.GIFDictionary);
+ return dict == null ? null : new CGImagePropertiesGif (dict);
+ }
+ }
+
#endif
}
@@ -500,6 +507,64 @@ namespace XamCore.CoreGraphics {
// TODO: Many more available but underlying types need to be investigated
}
+ public class CGImagePropertiesGif : DictionaryContainer
+ {
+ public CGImagePropertiesGif ()
+ : base (new NSMutableDictionary ())
+ {
+ }
+
+ public CGImagePropertiesGif (NSDictionary dictionary)
+ : base (dictionary)
+ {
+ }
+
+ public int? LoopCount {
+ get {
+ return GetInt32Value (Keys.GIFLoopCount);
+ }
+ set {
+ SetNumberValue (Keys.GIFLoopCount, value);
+ }
+ }
+
+ public double? DelayTime {
+ get {
+ return GetDoubleValue (Keys.GIFDelayTime);
+ }
+ set {
+ SetNumberValue (Keys.GIFDelayTime, value);
+ }
+ }
+
+ public NSData ImageColorMap {
+ get {
+ GetNativeValue<NSData> (Keys.GIFImageColorMap);
+ }
+ set {
+ SetNativeValue (Keys.GIFImageColorMap, value);
+ }
+ }
+
+ public bool? HasGlobalColorMap {
+ get {
+ GetBoolValue (Keys.GIFHasGlobalColorMap);
+ }
+ set {
+ SetBooleanValue (Keys.GIFHasGlobalColorMap, value);
+ }
+ }
+
+ public double? UnclampedDelayTime {
+ get {
+ GetDoubleValue (Keys.GIFUnclampedDelayTime);
+ }
+ set {
+ SetNumberValue (Keys.GIFUnclampedDelayTime, value);
+ }
+ }
+ }
+
public class CGImagePropertiesJfif : DictionaryContainer
{
public CGImagePropertiesJfif ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment