Пример #1
0
        public bool SizeMatches(GalImage Image)
        {
            if (ImageUtils.GetBytesPerPixel(Format) !=
                ImageUtils.GetBytesPerPixel(Image.Format))
            {
                return(false);
            }

            if (ImageUtils.GetAlignedWidth(this) !=
                ImageUtils.GetAlignedWidth(Image))
            {
                return(false);
            }

            return(Height == Image.Height);
        }
Пример #2
0
        public bool SizeMatches(GalImage image, bool ignoreLayer = false)
        {
            if (ImageUtils.GetBytesPerPixel(Format) !=
                ImageUtils.GetBytesPerPixel(image.Format))
            {
                return(false);
            }

            if (ImageUtils.GetAlignedWidth(this) !=
                ImageUtils.GetAlignedWidth(image))
            {
                return(false);
            }

            bool result = Height == image.Height && Depth == image.Depth;

            if (!ignoreLayer)
            {
                result = result && LayerCount == image.LayerCount;
            }

            return(result);
        }