internal override void Minimum(Image originalImage, KernelFunction kernelFunction, uint neighborhoodSize, uint x, uint y, Image outputImage) { ImageCMYK <T> castedOriginalImage = (ImageCMYK <T>)originalImage; ImageCMYK <T> castedOutputImage = (ImageCMYK <T>)outputImage; castedOutputImage.C.Minimum(castedOriginalImage.C, kernelFunction, x, y, neighborhoodSize); castedOutputImage.M.Minimum(castedOriginalImage.M, kernelFunction, x, y, neighborhoodSize); castedOutputImage.Y.Minimum(castedOriginalImage.Y, kernelFunction, x, y, neighborhoodSize); castedOutputImage.K.Minimum(castedOriginalImage.K, kernelFunction, x, y, neighborhoodSize); }
public override Image Clone() { ImageCMYK <T> clone = (ImageCMYK <T>)ImageFactory.Create(Width, Height, ColorModel.CMYK, GetDataType()); clone.C = (GenericChannel <T>)C.Clone(); clone.M = (GenericChannel <T>)M.Clone(); clone.Y = (GenericChannel <T>)Y.Clone(); clone.K = (GenericChannel <T>)K.Clone(); return(clone); }
internal override GenericImage <T> Add(GenericImage <T> other) { ImageCMYK <T> outcome = (ImageCMYK <T>)ImageFactory.Create(Width, Height, GetColorModel(), GetDataType()); ImageCMYK <T> otherCMYK = (ImageCMYK <T>)other.ToCMYK(); outcome.C = C.Add(otherCMYK.C); outcome.M = M.Add(otherCMYK.M); outcome.Y = Y.Add(otherCMYK.Y); outcome.K = K.Add(otherCMYK.K); return(outcome); }
public override Image ToCMYK() { ImageCMYK <T> result = (ImageCMYK <T>)ImageFactory.Create(Width, Height, ColorModel.CMYK, GetDataType()); for (int x = 0; x < Width; x++) { for (int y = 0; y < Height; y++) { result.C[x, y] = Gray[x, y]; result.M[x, y] = Gray[x, y]; result.Y[x, y] = Gray[x, y]; result.K[x, y] = Gray[x, y]; } } return(result); }