public static CGImageDestination FromUrl(NSUrl url, string typeIdentifier, int imageCount, CGImageDestinationOptions options)
        {
            if (url == null)
            {
                throw new ArgumentNullException("url");
            }
            if (typeIdentifier == null)
            {
                throw new ArgumentNullException("typeIdentifier");
            }

            var dict = options == null ? null : options.ToDictionary();
            var ret  = new CGImageDestination(CGImageDestinationCreateWithURL(url.Handle, new NSString(typeIdentifier).Handle, (IntPtr)imageCount, dict == null ? IntPtr.Zero : dict.Handle));

            if (dict != null)
            {
                dict.Dispose();
            }
            return(ret);
        }
Exemplo n.º 2
0
		public static CGImageDestination FromUrl (NSUrl url, string typeIdentifier, int imageCount, CGImageDestinationOptions options)
		{
			if (url == null)
				throw new ArgumentNullException ("url");
			if (typeIdentifier == null)
				throw new ArgumentNullException ("typeIdentifier");

			var dict = options == null ? null : options.ToDictionary ();
			var typeId = NSString.CreateNative (typeIdentifier);
			IntPtr p = CGImageDestinationCreateWithURL (url.Handle, typeId, (IntPtr) imageCount, dict == null ? IntPtr.Zero : dict.Handle);
			NSString.ReleaseNative (typeId);
			var ret = p == IntPtr.Zero ? null : new CGImageDestination (p, true);
			if (dict != null)
				dict.Dispose ();
			return ret;
		}
Exemplo n.º 3
0
        public static CGImageDestination FromData(NSData data, string typeIdentifier, int imageCount, CGImageDestinationOptions options)
        {
            if (data == null)
            {
                throw new ArgumentNullException("data");
            }
            if (typeIdentifier == null)
            {
                throw new ArgumentNullException("typeIdentifier");
            }

            var    dict = options == null ? null : options.ToDictionary();
            IntPtr p    = CGImageDestinationCreateWithData(data.Handle, new NSString(typeIdentifier).Handle, (IntPtr)imageCount, dict == null ? IntPtr.Zero : dict.Handle);
            var    ret  = p == IntPtr.Zero ? null : new CGImageDestination(p);

            if (dict != null)
            {
                dict.Dispose();
            }
            return(ret);
        }
        public static CGImageDestination FromData(NSData data, string typeIdentifier, int imageCount, CGImageDestinationOptions options)
        {
            if (data == null)
                throw new ArgumentNullException ("data");
            if (typeIdentifier == null)
                throw new ArgumentNullException ("typeIdentifier");

            var dict = options == null ? null : options.ToDictionary ();
            IntPtr p = CGImageDestinationCreateWithData (data.Handle, new NSString (typeIdentifier).Handle, (IntPtr) imageCount, dict == null ? IntPtr.Zero : dict.Handle);
            var ret = p == IntPtr.Zero ? null : new CGImageDestination (p);
            if (dict != null)
                dict.Dispose ();
            return ret;
        }
Exemplo n.º 5
0
        public static CGImageDestination FromUrl(NSUrl url, string typeIdentifier, int imageCount, CGImageDestinationOptions options)
        {
            if (url == null)
            {
                throw new ArgumentNullException("url");
            }
            if (typeIdentifier == null)
            {
                throw new ArgumentNullException("typeIdentifier");
            }

            var    dict   = options == null ? null : options.ToDictionary();
            var    typeId = NSString.CreateNative(typeIdentifier);
            IntPtr p      = CGImageDestinationCreateWithURL(url.Handle, typeId, (IntPtr)imageCount, dict == null ? IntPtr.Zero : dict.Handle);

            NSString.ReleaseNative(typeId);
            var ret = p == IntPtr.Zero ? null : new CGImageDestination(p, true);

            if (dict != null)
            {
                dict.Dispose();
            }
            return(ret);
        }
Exemplo n.º 6
0
        public static CGImageDestination FromUrl(NSUrl url, string typeIdentifier, int imageCount, CGImageDestinationOptions options)
        {
            if (url == null)
                throw new ArgumentNullException ("url");
            if (typeIdentifier == null)
                throw new ArgumentNullException ("typeIdentifier");

            var dict = options == null ? null : options.ToDictionary ();
            var ret = new CGImageDestination (CGImageDestinationCreateWithURL (url.Handle, new NSString (typeIdentifier).Handle, (IntPtr) imageCount, dict == null ? IntPtr.Zero : dict.Handle));
                        if (dict != null)
                    dict.Dispose ();
            return ret;
        }