How to remove the transparent part of an exported visualisation
TIBCO Spotfire®

 

Hey there,

my exported Visualization has always a transparent part.

In the visualization is a text area where the transparent part of the picture is.

How can i export the visualization without the transparent part?

i use a following script to export a visualization:

import System
from System.Drawing import Bitmap, Rectangle
from System.Drawing import Graphics, Image
from Spotfire.Dxp.Framework.ApplicationModel import ApplicationThread

app = Application.GetService(ApplicationThread)
image = Bitmap(1445, 1032)

def f(visual=visual, document=Document, app=app, image=image, Graphics=Graphics, Rectangle=Rectangle):

 try:
  vis = visual
  gfx = Graphics.FromImage(image)
  rect = Rectangle(0,0,image.Width,image.Height)
  visualBounds = document.ActivePageReference.GetVisualBounds(vis, rect)
  vis.Render(gfx, visualBounds)
 except:
  return
 # DO SOMETHING WITH THE IMAGE HERE
 image.Save(r'C:\Temp\image.png')
app.InvokeAsynchronously(f)

My Script parameter is:

visual as Type Visualization from my data table

 

Can anybody help me to remove the transparent part?

 

Thanks in advance,

Anja

 

Attachments

AttachmentSize
Image icon spotfire.jpg215.45 KB
Image icon image.png47.24 KB

(2) Answers

Login