private void LoadPhoto(PxMetaImage metaImage) { using (NSAutoreleasePool autoreleasePool = new NSAutoreleasePool()) { UIImage image = metaImage.Image; CGSize maxSuportedSize = PxSDK.SupportedImageSize(image.Size); if (image.Size != maxSuportedSize) { // Resize input image if its size is greater than the supported maximum metaImage.Image = ImageUtils.ScaleImage(image, maxSuportedSize); } this.inImage = metaImage; this.outImage = null; this.ImageView.Image = metaImage.Image; this.SaveButton.Enabled = false; } }
private bool ProcessCrop(PxMetaImage source, out PxRectangle pts) { PxDocCorners docCorners; bool result = PxSDK.DetectDocumentCorners(source, out docCorners); pts.leftTop = docCorners.ptUL; pts.rightTop = docCorners.ptUR; pts.leftBotton = docCorners.ptBL; pts.rightBotton = docCorners.ptBR; bool isSmartCropMode = false; if (result) { isSmartCropMode = docCorners.isSmartCropMode; } return(isSmartCropMode); }
private static PxMetaImage DoColor(PxMetaImage source) { return(PxSDK.ImageColorBinarization(source)); }
private static PxMetaImage DoGray(PxMetaImage source) { return(PxSDK.ImageGrayBinarization(source)); }
private static PxMetaImage DoBW(PxMetaImage source) { return(PxSDK.ImageBWBinarization(source)); }
private static PxMetaImage DoOriginal(PxMetaImage source) { return(PxSDK.ImageOriginal(source)); }
private PxMetaImage ProcessPerspective(PxMetaImage source) { // Get image without perspective distortion. return(PxSDK.CorrectDocument(source, ref points)); }