use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-graphics")]
use objc2_core_graphics::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-image-io")]
use objc2_image_io::*;
use crate::*;
pub type MLFeatureValueImageOption = NSString;
extern "C" {
pub static MLFeatureValueImageOptionCropRect: &'static MLFeatureValueImageOption;
}
extern "C" {
pub static MLFeatureValueImageOptionCropAndScale: &'static MLFeatureValueImageOption;
}
#[cfg(feature = "MLFeatureValue")]
impl MLFeatureValue {
extern_methods!(
#[unsafe(method(featureValueWithImageAtURL:pixelsWide:pixelsHigh:pixelFormatType:options:error:_))]
#[unsafe(method_family = none)]
pub unsafe fn featureValueWithImageAtURL_pixelsWide_pixelsHigh_pixelFormatType_options_error(
url: &NSURL,
pixels_wide: NSInteger,
pixels_high: NSInteger,
pixel_format_type: OSType,
options: Option<&NSDictionary<MLFeatureValueImageOption, AnyObject>>,
) -> Result<Retained<Self>, Retained<NSError>>;
#[cfg(feature = "MLImageConstraint")]
#[unsafe(method(featureValueWithImageAtURL:constraint:options:error:_))]
#[unsafe(method_family = none)]
pub unsafe fn featureValueWithImageAtURL_constraint_options_error(
url: &NSURL,
constraint: &MLImageConstraint,
options: Option<&NSDictionary<MLFeatureValueImageOption, AnyObject>>,
) -> Result<Retained<Self>, Retained<NSError>>;
#[cfg(feature = "objc2-core-graphics")]
#[unsafe(method(featureValueWithCGImage:pixelsWide:pixelsHigh:pixelFormatType:options:error:_))]
#[unsafe(method_family = none)]
pub unsafe fn featureValueWithCGImage_pixelsWide_pixelsHigh_pixelFormatType_options_error(
cg_image: &CGImage,
pixels_wide: NSInteger,
pixels_high: NSInteger,
pixel_format_type: OSType,
options: Option<&NSDictionary<MLFeatureValueImageOption, AnyObject>>,
) -> Result<Retained<Self>, Retained<NSError>>;
#[cfg(all(feature = "MLImageConstraint", feature = "objc2-core-graphics"))]
#[unsafe(method(featureValueWithCGImage:constraint:options:error:_))]
#[unsafe(method_family = none)]
pub unsafe fn featureValueWithCGImage_constraint_options_error(
cg_image: &CGImage,
constraint: &MLImageConstraint,
options: Option<&NSDictionary<MLFeatureValueImageOption, AnyObject>>,
) -> Result<Retained<Self>, Retained<NSError>>;
#[cfg(feature = "objc2-image-io")]
#[unsafe(method(featureValueWithImageAtURL:orientation:pixelsWide:pixelsHigh:pixelFormatType:options:error:_))]
#[unsafe(method_family = none)]
pub unsafe fn featureValueWithImageAtURL_orientation_pixelsWide_pixelsHigh_pixelFormatType_options_error(
url: &NSURL,
orientation: CGImagePropertyOrientation,
pixels_wide: NSInteger,
pixels_high: NSInteger,
pixel_format_type: OSType,
options: Option<&NSDictionary<MLFeatureValueImageOption, AnyObject>>,
) -> Result<Retained<Self>, Retained<NSError>>;
#[cfg(all(feature = "MLImageConstraint", feature = "objc2-image-io"))]
#[unsafe(method(featureValueWithImageAtURL:orientation:constraint:options:error:_))]
#[unsafe(method_family = none)]
pub unsafe fn featureValueWithImageAtURL_orientation_constraint_options_error(
url: &NSURL,
orientation: CGImagePropertyOrientation,
constraint: &MLImageConstraint,
options: Option<&NSDictionary<MLFeatureValueImageOption, AnyObject>>,
) -> Result<Retained<Self>, Retained<NSError>>;
#[cfg(all(feature = "objc2-core-graphics", feature = "objc2-image-io"))]
#[unsafe(method(featureValueWithCGImage:orientation:pixelsWide:pixelsHigh:pixelFormatType:options:error:_))]
#[unsafe(method_family = none)]
pub unsafe fn featureValueWithCGImage_orientation_pixelsWide_pixelsHigh_pixelFormatType_options_error(
cg_image: &CGImage,
orientation: CGImagePropertyOrientation,
pixels_wide: NSInteger,
pixels_high: NSInteger,
pixel_format_type: OSType,
options: Option<&NSDictionary<MLFeatureValueImageOption, AnyObject>>,
) -> Result<Retained<Self>, Retained<NSError>>;
#[cfg(all(
feature = "MLImageConstraint",
feature = "objc2-core-graphics",
feature = "objc2-image-io"
))]
#[unsafe(method(featureValueWithCGImage:orientation:constraint:options:error:_))]
#[unsafe(method_family = none)]
pub unsafe fn featureValueWithCGImage_orientation_constraint_options_error(
cg_image: &CGImage,
orientation: CGImagePropertyOrientation,
constraint: &MLImageConstraint,
options: Option<&NSDictionary<MLFeatureValueImageOption, AnyObject>>,
) -> Result<Retained<Self>, Retained<NSError>>;
);
}