Inheritance: ModelBase
        private void OnGeneratedImage(OutputImage outputImage)
        {
            // Add the new image to the project

            ImageResizePackage.Instance.MainThreadHelper.Invoke(() =>
            {
                IVsHierarchy hierarchy = outputImage.Owner.Owner.Item.pHier;
                uint itemId = outputImage.Owner.Owner.Item.itemid;
                uint parentId = hierarchy.FindParentId(itemId);
                hierarchy.AddItem(parentId, outputImage.Path);
            });
        }
Exemplo n.º 2
0
        public void AddImage(OutputImage image)
        {
            if (image != null && !this.images.Contains(image))
            {
                this.images.Add(image);

                image.PropertyChanged += OnImagePropertyChanged;
            }
        }
 private void GenerateImage(OutputImage image)
 {
     SourceImage sourceImage = image.Owner.Owner;
     BitmapSource source = sourceImage.Frame.Render(image.PixelWidth, image.PixelHeight, image.TransformType);
     ImageHelpers.SaveBitmap(source, image.OutputFileType, image.Path);
 }