Пример #1
0
 public Image ModPicMorph(Image img, CAPI.MorphMode mode, CAPI.MorphStructureEnum stelem, int kernelSize, int threshold)
 {
     String inPath = getUPath();
     img.Save(inPath);
     String outPath = getUPath();
     CAPI.ModifyPictureMorph(inPath, outPath, (int) mode, (int) stelem, kernelSize, threshold);
     return Image.FromFile(outPath);
 }
Пример #2
0
 public Image ModPicBlur(Image img, CAPI.BlurMode mode, int kernelSize)
 {
     String inPath = getUPath();
     img.Save(inPath);
     String outPath = getUPath();
     CAPI.ModifyPictureBlur(inPath, outPath, (int)mode, (int)kernelSize);
     return Image.FromFile(outPath);
 }
Пример #3
0
 public Image ModPicMode(Image img, CAPI.ImageMode mode, CAPI.ColorMap cmmode)
 {
     if (mode == CAPI.ImageMode.None) return null;
     String inPath = getUPath();
     img.Save(inPath);
     String outPath = getUPath();
     CAPI.ModifyPictureMode(inPath, outPath, (int) mode, (int) cmmode);
     return Image.FromFile(outPath);
 }
Пример #4
0
 public Image ModPicBoolean(Image img1, Image img2, CAPI.BooleanMode bmode, bool drawArtifacts)
 {
     if (img2 == null) return null;
     String inPath2 = getUPath();
     img2.Save(inPath2);
     String outPath = getUPath();
     if (bmode == CAPI.BooleanMode.CONTOURS)
         CAPI.ModifyPictureContours(inPath2, outPath, drawArtifacts, 1);
     else if (bmode == CAPI.BooleanMode.ROTATIONPOINTS)
         CAPI.ModifyPictureContours(inPath2, outPath, drawArtifacts, 2);
     else if (bmode == CAPI.BooleanMode.ROTATE_RESIZE)
         CAPI.ModifyPictureContours(inPath2, outPath, drawArtifacts, 3);
     else
     {
         if (img1 == null) return null;
         String inPath1 = getUPath();
         img1.Save(inPath1);
         CAPI.ModifyPictureBool(inPath1, inPath2, outPath, (int)bmode);
     }
     return System.IO.File.Exists(outPath) ? Image.FromFile(outPath) : null;
 }