public CIFeature [] FeaturesInImage (CIImage image, CIImageOrientation orientation) { using (var options = NSDictionary.FromObjectsAndKeys (new NSObject [] { new NSNumber ((int) orientation) }, new NSObject [] { ImageOrientation })){ return FeaturesInImage (image, options); } }
internal void SetBackgroundImage(CIImage value) { using (var nsstr = new NSString("inputBackgroundImage")) SetValueForKey(value, nsstr); }
internal void SetInputImage(CIImage value) { SetValueForKey(value, CIFilterInputKey.Image); }
internal void SetBackgroundImage (CIImage value) { SetImage ("inputBackgroundImage", value); }
internal void SetImage (string key, CIImage value) { using (var nsstr = new NSString (key)) SetValueForKey (value, nsstr); }
public CGImage CreateCGImage(CIImage image, System.Drawing.RectangleF fromRect, CIFormat ciImageFormat, CGColorSpace colorSpace) { return(CreateCGImage(image, fromRect, CIImage.CIFormatToInt(ciImageFormat), colorSpace)); }
internal void SetInputImage (CIImage value) { SetValueForKey (value, CIFilterInputKey.Image); }
public CISampler(CIImage sourceImage, CISamplerOptions options) : this(sourceImage, options == null ? null : options.ToDictionary()) { }
public CGImage CreateCGImage(CIImage image, CGRect fromRect, CIFormat ciImageFormat, CGColorSpace colorSpace) { return(CreateCGImage(image, fromRect, CIImage.CIFormatToInt(ciImageFormat), colorSpace)); }
public CGImage CreateCGImage (CIImage image, System.Drawing.RectangleF fromRect, CIFormat ciImageFormat, CGColorSpace colorSpace) { return CreateCGImage (image, fromRect, CIImage.CIFormatToInt (ciImageFormat), colorSpace); }
public CISampler (CIImage sourceImage, CISamplerOptions options) : this (sourceImage, options == null ? null : options.ToDictionary ()) { }
public CISampler FromImage (CIImage sourceImage, CISamplerOptions options) { if (options == null) return FromImage (sourceImage); return FromImage (sourceImage, options.ToDictionary ()); }
internal void SetBackgroundImage(CIImage value) { using (var nsstr = new NSString ("inputBackgroundImage")) SetValueForKey (value, nsstr); }
private void CreateTransitions() { var bundle = NSBundle.MainBundle; // Shading & mask for transitions (borrowed from the "Fun House" Core Image example). var inputShadingImage = new CIImage(NSData.FromFile(bundle.PathForResource("restrictedshine", "tiff"))); var grayscaleImage = new CIImage(NSData.FromFile(bundle.PathForResource("grayscale", "jpg"))); transitionInputMaskImage = new CIImage(NSData.FromFile(bundle.PathForResource("transitionmask", "jpg"))); typeTransition = new CATransition(); typeTransition.Duration = driver != null ? driver.Model.TransitionSeconds : 0.5; typeTransition.Type = CATransition.TransitionPush; typeTransition.Subtype = CATransition.TransitionFromLeft; typeTransition.TimingFunction = CAMediaTimingFunction.FromName(CAMediaTimingFunction.EaseInEaseOut); barsSwipeTransition = new CIBarsSwipeTransition(); barsSwipeTransition.SetDefaults(); copyMachineTransition = new CICopyMachineTransition(); copyMachineTransition.SetDefaults(); disintegrateTransform = new CILanczosScaleTransform(); disintegrateTransform.SetDefaults(); disintegrateTransform.Image = transitionInputMaskImage; disintegrateTransition = new CIDisintegrateWithMaskTransition(); disintegrateTransition.SetDefaults(); dissolveTransition = new CIDissolveTransition(); dissolveTransition.SetDefaults(); flashTransition = new CIFlashTransition(); flashTransition.SetDefaults(); flashTransition.Color = new CIColor(NSColor.Black.CGColor); modTransition = new CIModTransition(); modTransition.SetDefaults(); pageCurlShadowTransition = CIFilter.FromName("CIPageCurlWithShadowTransition"); pageCurlShadowTransition.SetDefaults(); pageCurlShadowTransition.SetValueForKey(NSNumber.FromDouble(Math.PI / 4), (NSString) "inputAngle"); pageCurlShadowTransition.SetValueForKey(grayscaleImage, (NSString) "inputBacksideImage"); rippleTransition = new CIRippleTransition(); rippleTransition.SetDefaults(); rippleTransition.ShadingImage = inputShadingImage; swipeTransition = new CISwipeTransition(); swipeTransition.SetDefaults(); filterTransition = new CATransition(); filterTransition.filter = disintegrateTransition; filterTransition.Duration = typeTransition.Duration; // transitionFilters.Add(barsSwipeTransition); // transitionFilters.Add(copyMachineTransition); // transitionFilters.Add(disintegrateTransition); // transitionFilters.Add(dissolveTransition); // transitionFilters.Add(flashTransition); // transitionFilters.Add(modTransition); // transitionFilters.Add(pageCurlShadowTransition); // transitionFilters.Add(rippleTransition); // transitionFilters.Add(swipeTransition); }