~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/maccore/src/ImageIO/CGImageDestination.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
                        if (kLossyCompressionQuality != IntPtr.Zero)
43
43
                                return;
44
44
                        
45
 
                        IntPtr lib = Dlfcn.dlopen (Constants.ImageIOLibrary, 0);
 
45
                        IntPtr lib = Libraries.ImageIO.Handle;
46
46
                        kLossyCompressionQuality = Dlfcn.GetIntPtr (lib, "kCGImageDestinationLossyCompressionQuality");
47
47
                        kBackgroundColor = Dlfcn.GetIntPtr (lib, "kCGImageDestinationBackgroundColor");
48
 
                        Dlfcn.dlclose (lib);
49
48
                }
50
49
 
51
50
                public float? LossyCompressionQuality { get; set; }
136
135
                                throw new ArgumentNullException ("typeIdentifier");
137
136
 
138
137
                        var dict = options == null ? null : options.ToDictionary ();
139
 
                        var ret = new CGImageDestination (CGImageDestinationCreateWithData (data.Handle, new NSString (typeIdentifier).Handle, (IntPtr) imageCount, dict == null ? IntPtr.Zero : dict.Handle));
140
 
                        if (dict != null)
141
 
                                dict.Dispose ();
 
138
                        IntPtr p = CGImageDestinationCreateWithData (data.Handle, new NSString (typeIdentifier).Handle, (IntPtr) imageCount, dict == null ? IntPtr.Zero : dict.Handle);
 
139
                        var ret = p == IntPtr.Zero ? null : new CGImageDestination (p);
 
140
                        if (dict != null)
 
141
                                dict.Dispose ();
142
142
                        return ret;
143
143
                }
144
144
 
158
158
                                throw new ArgumentNullException ("typeIdentifier");
159
159
 
160
160
                        var dict = options == null ? null : options.ToDictionary ();
161
 
                        var ret = new CGImageDestination (CGImageDestinationCreateWithURL (url.Handle, new NSString (typeIdentifier).Handle, (IntPtr) imageCount, dict == null ? IntPtr.Zero : dict.Handle));
162
 
                        if (dict != null)
163
 
                                dict.Dispose ();
 
161
                        IntPtr p = CGImageDestinationCreateWithURL (url.Handle, new NSString (typeIdentifier).Handle, (IntPtr) imageCount, dict == null ? IntPtr.Zero : dict.Handle);
 
162
                        var ret = p == IntPtr.Zero ? null : new CGImageDestination (p);
 
163
                        if (dict != null)
 
164
                                dict.Dispose ();
164
165
                        return ret;
165
166
                }
166
167
 
202
203
                {
203
204
                        var success = CGImageDestinationFinalize (handle);
204
205
                        Dispose ();
205
 
                        return success;
 
206
                        return success;
206
207
                }
207
208
        }
208
209
}
 
 
b'\\ No newline at end of file'