public CGMutableImageMetadata(CGImageMetadata metadata) :
     base(CGImageMetadataCreateMutableCopy(metadata.Handle))
 {
     if (metadata == null)
     {
         throw new ArgumentNullException("metadata");
     }
 }
Пример #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);
        }
Пример #3
0
        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));
        }
Пример #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();
                }
            }
        }
Пример #5
0
 public CGMutableImageMetadata(CGImageMetadata metadata)
     : base(CGImageMetadataCreateMutableCopy (metadata.Handle))
 {
     if (metadata == null)
         throw new ArgumentNullException ("metadata");
 }
Пример #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 ();
			}
		}
Пример #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);
		}
Пример #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);
 }