public void GlobalSetup()
        {
            var sourceFile = Common.GetSourceImagePath(imageIndex);

            image     = ImageFrame.FromFile(sourceFile);
            LZEncoded = image.AsLZEncodedUsingTrie(1);
        }
Beispiel #2
0
        /// <summary>
        /// Decodes LZ compressed data
        /// </summary>
        /// <typeparam name="T">Type of image</typeparam>
        /// <param name="encodedImage">LZ encoded image frame</param>
        /// <param name="hashPrime">m value used in hash table</param>
        /// <returns>Decompressed data</returns>
        public static T AsImageFrameUsingHashTable <T>(this LZImageFrame encodedImage, int hashPrime) where T : ImageFrame, new()
        {
            var ret = new T();

            ret.FromBytes(encodedImage.Codes.AsLZDecodedUsingHashTable(hashPrime));
            return(ret);
        }
Beispiel #3
0
        /// <summary>
        /// Decodes LZ compressed data
        /// </summary>
        /// <typeparam name="T">Type of image</typeparam>
        /// <param name="encodedImage">LZ encoded image frame</param>
        /// <returns>Return image frame of type T</returns>
        public static T AsImageFrameUsingTrie256 <T>(this LZImageFrame encodedImage) where T : ImageFrame, new()
        {
            var ret = new T();

            ret.FromBytes(encodedImage.Codes.AsLZDecodedUsingTrie256());
            return(ret);
        }
Beispiel #4
0
        /// <summary>
        /// Decodes LZ compressed data
        /// </summary>
        /// <typeparam name="T">Type of image</typeparam>
        /// <param name="encodedImage">LZ encoded image frame</param>
        /// <param name="nodeInitialCapacity">Node table initial size</param>
        /// <returns>Return image frame of type T</returns>
        public static T AsImageFrameUsingTrie <T>(this LZImageFrame encodedImage, int nodeInitialCapacity) where T : ImageFrame, new()
        {
            var ret = new T();

            ret.FromBytes(encodedImage.Codes.AsLZDecodedUsingTrie(nodeInitialCapacity));
            return(ret);
        }
        public void GlobalSetup()
        {
            var sourceFile = Common.GetSourceImagePath(imageIndex);

            image       = ImageFrame.FromFile(sourceFile);
            LZEncoded   = image.AsLZEncodedUsingHashTable(12289);
            GZipEncoded = image.AsGZipEncoded();
        }
        public void GlobalSetup()
        {
            var sourceFile = Common.GetSourceImagePath(imageIndex);

            image = ImageFrame.FromFile(sourceFile).AsCroppedImage(new CropSetup {
                LeftPx = Crop * 16, RightPx = Crop * 16, TopPx = Crop * 16, BottomPx = Crop * 16
            });
            LZEncoded = image.AsLZEncodedUsingHashTable(12289);
        }