////////////////////////////////////////////////////////
//
// GEM - Graphics Environment for Multimedia
//
// geiger@epy.co.at
//
// Implementation file
//
//    Copyright (c) 2000 Guenter Geiger
//    For information on usage and redistribution, and for a DISCLAIMER OF ALL
//    WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution.
//
/////////////////////////////////////////////////////////

#include "mgck_base.h"


MAKE_MAGICK_EXTERN0(despecle, DespeckleImage)
MAKE_MAGICK_EXTERN(edge, EdgeImage)
MAKE_MAGICK_EXTERN2(emboss, EmbossImage)
MAKE_MAGICK_EXTERN0(enhance, EnhanceImage)
MAKE_MAGICK_EXTERN2(gaussblur, GaussianBlurImage)
MAKE_MAGICK_EXTERN(implode, ImplodeImage)
MAKE_MAGICK_EXTERN(medianfilt, MedianFilterImage)
MAKE_MAGICK_EXTERN(oil, OilPaintImage)
MAKE_MAGICK_EXTERN(denoise, ReduceNoiseImage)
MAKE_MAGICK_EXTERN3(shade, ShadeImage)
MAKE_MAGICK_EXTERN(spread, SpreadImage)
MAKE_MAGICK_EXTERN(swirl, SwirlImage)
MAKE_MAGICK_EXTERN2(wave, WaveImage)
MAKE_MAGICK_EXTERN4(unsharp, UnsharpMaskImage)

MAKE_MAGICK_EXTERN_FUNC(blur,2, BlurImage)
{ 
  if (a[0] == 0) a[0]=1;
  return BlurImage ( mgck_image, a[0], a[1], &m_exception ); 
}


MAKE_MAGICK_EXTERN_FUNC(sharpen, 2,SharpenImage)
{ 
  if (a[0] == 0) a[0]=1;
  return SharpenImage ( mgck_image, a[0], a[1], &m_exception ); 
}


MAKE_MAGICK_EXTERN_FUNC(noise, 1,AddNoiseImage)
{ return AddNoiseImage ( mgck_image, (NoiseType) (int)a[0], &m_exception ); }

MAKE_MAGICK_EXTERN_FUNC(solarize, 1,SolarizeImage)
{ SolarizeImage ( mgck_image, a[0]); return CloneImage ( mgck_image, image.xsize, image.ysize, 0, &m_exception );  }

MAKE_MAGICK_EXTERN_FUNC(threshold, 1,ThresholdImage)
{ ThresholdImage ( mgck_image, a[0]);  return CloneImage ( mgck_image, image.xsize, image.ysize, 0, &m_exception );}

MAKE_MAGICK_EXTERN_FUNC(resize, 2,ResizeImage)
{   
  if (a[0] <= 0) a[0] = 128;
  if (a[1] <= 0) a[1] = 128;
  image.xsize = a[0];
  image.ysize= a[1];
  return ResizeImage( mgck_image, a[0], a[1],(FilterTypes) 0, 0, &m_exception );
}

//MAKE_MAGICK_EXTERN_FUNC(colorize, ColorizeImage)
  //MAKE_MAGICK_EXTERN(convolve, ConvolveImage)
  //MAKE_MAGICK_EXTERN(morph, MorphImages)
  //MAKE_MAGICK_EXTERN0(plasma, PlasmaImage)
  //MAKE_MAGICK_EXTERN(stegano, SteganoImage)
  //MAKE_MAGICK_EXTERN(stereo, StereoImage)
  
  



