btswebdoc.CmdClient.OrchestrationOverviewImage.GetImage C# (CSharp) Method

GetImage() public method

public GetImage ( ) : Bitmap
return System.Drawing.Bitmap
        public Bitmap GetImage()
        {
            return OrchViewer.GetOrchestationImage(this, _orchestration);
        }

Usage Example

Example #1
0
        public void ExportOrchestrationOverviews(IEnumerable <BtsOrchestration> omOrchestrations)
        {
            Log.Info("Exports orchestrations");

            foreach (var omOrchestration in omOrchestrations)
            {
                if (!_generatedOrchestrations.Contains(omOrchestration.FullName))
                {
                    try
                    {
                        var filePath = Path.Combine(_orchestrationExportPath, string.Concat(omOrchestration.FullName, ".jpg"));

                        Log.Debug("Exports overview image for orchestration {0}", omOrchestration.FullName);

                        var orchestrationOverviewImage = new OrchestrationOverviewImage(omOrchestration);
                        using (var image = orchestrationOverviewImage.GetImage())
                        {
                            image.Save(filePath);
                            using (var thumbnail = image.GetThumbnailImage(150, 150, null, IntPtr.Zero))
                            {
                                thumbnail.Save(Path.Combine(_orchestrationExportPath, string.Concat(omOrchestration.FullName, "_thumb.jpg")));
                            }
                        }

                        _generatedOrchestrations.Add(omOrchestration.FullName);
                    }
                    catch (Exception ex)
                    {
                        Log.Error(string.Format("Couldn't generate image for orchestration {0}", omOrchestration.FullName), ex);
                    }
                }
            }
        }
All Usage Examples Of btswebdoc.CmdClient.OrchestrationOverviewImage::GetImage