Exemplo n.º 1
0
 public PSPFile()
 {
     this.fileHeader      = null;
     this.imageAttributes = null;
     this.extData         = null;
     this.creator         = null;
     this.compImage       = null;
     this.globalPalette   = null;
     this.layerBlock      = null;
     this.v5Thumbnail     = null;
 }
Exemplo n.º 2
0
        private void CreateThumbnailBlock(Document input, Surface scratchSurface, ProgressEventHandler callback, ushort majorVersion)
        {
            Size thumbSize = GetThumbnailDimensions(input.Width, input.Height, 300);

            this.v5Thumbnail = new ThumbnailBlock(thumbSize.Width, thumbSize.Height);

            scratchSurface.Clear(ColorBgra.White);
            using (RenderArgs args = new RenderArgs(scratchSurface))
            {
                input.Render(args, false);
                using (Surface fit = new Surface(thumbSize))
                {
                    fit.FitSurface(ResamplingAlgorithm.SuperSampling, args.Surface);

                    this.totalProgress += 3;

                    this.v5Thumbnail.channelBlocks = SplitImageChannels(args.Surface, args.Surface.Bounds, 3, majorVersion, true, callback);
                }
            }
        }