Example #1
0
        public ImageResizer(MosaicData mData, ProgressData pData)
        {
            if (mData == null)
            {
                throw new ArgumentNullException("mData");
            }

            _pData = pData ??
                     throw new ArgumentNullException("pData");

            _paths = mData.Paths;

            ResizedImage  = mData.LoadedImage;
            OriginalSize  = ResizedImage.Size;
            ElementPixels = new List <ColorBlock>(_paths.Count);

            // Prefill the list

            for (int i = 0; i < _paths.Count; i++)
            {
                ElementPixels.Add(null);
            }
        }