public CGMutableImageMetadata(CGImageMetadata metadata) :
     base(CGImageMetadataCreateMutableCopy(metadata.Handle))
 {
     if (metadata == null)
     {
         throw new ArgumentNullException("metadata");
     }
 }
Beispiel #2
0
        public void AddImageAndMetadata(CGImage image, CGImageMetadata meta, NSDictionary options)
        {
            if (image == null)
            {
                throw new ArgumentNullException("image");
            }
            IntPtr m = meta == null ? IntPtr.Zero : meta.Handle;
            IntPtr o = options == null ? IntPtr.Zero : options.Handle;

            CGImageDestinationAddImageAndMetadata(handle, image.Handle, m, o);
        }
        public NSString GetStringValue(CGImageMetadata parent, NSString path)
        {
            // parent may be null
            if (path == null)
            {
                throw new ArgumentNullException("path");
            }
            IntPtr p      = parent == null ? IntPtr.Zero : parent.Handle;
            IntPtr result = CGImageMetadataCopyStringValueWithPath(Handle, p, path.Handle);

            return((result == IntPtr.Zero) ? null : new NSString(result));
        }
Beispiel #4
0
        public void AddImageAndMetadata(CGImage image, CGImageMetadata meta, CGImageDestinationOptions options)
        {
            NSDictionary o = null;

            if (options != null)
            {
                o = options.ToDictionary();
            }
            try {
                AddImageAndMetadata(image, meta, o);
            }
            finally {
                if (options != null)
                {
                    o.Dispose();
                }
            }
        }
Beispiel #5
0
 public CGMutableImageMetadata(CGImageMetadata metadata)
     : base(CGImageMetadataCreateMutableCopy (metadata.Handle))
 {
     if (metadata == null)
         throw new ArgumentNullException ("metadata");
 }
Beispiel #6
0
		public void AddImageAndMetadata (CGImage image, CGImageMetadata meta, CGImageDestinationOptions options)
		{
			NSDictionary o = null;
			if (options != null)
				o = options.ToDictionary ();
			try {
				AddImageAndMetadata (image, meta, o);
			}
			finally {
				if (options != null)
					o.Dispose ();
			}
		}
Beispiel #7
0
		public void AddImageAndMetadata (CGImage image, CGImageMetadata meta, NSDictionary options)
		{
			if (image == null)
				throw new ArgumentNullException ("image");
			IntPtr m = meta == null ? IntPtr.Zero : meta.Handle;
			IntPtr o = options == null ? IntPtr.Zero : options.Handle;
			CGImageDestinationAddImageAndMetadata (handle, image.Handle, m, o);
		}
Beispiel #8
0
 public CGImageMetadataTag GetTag(CGImageMetadata parent, NSString path)
 {
     // parent may be null
     if (path == null)
         throw new ArgumentNullException ("path");
     IntPtr p = parent == null ? IntPtr.Zero : parent.Handle;
     IntPtr result = CGImageMetadataCopyTagWithPath (Handle, p, path.Handle);
     return (result == IntPtr.Zero) ? null : new CGImageMetadataTag (result);
 }