Saving Image as PNG no transparency
Saving Image as PNG no transparency
Hi
I am using the TeeSaveToPNG function to save a bar chart with 50% transparency, but when I looked at the saved PNG the transparency has all gone, and the bars are 100% solid. Surely I should get a WYSIWYG image of whats on the screen, or am I missing something?
Bruce.
I am using the TeeSaveToPNG function to save a bar chart with 50% transparency, but when I looked at the saved PNG the transparency has all gone, and the bars are 100% solid. Surely I should get a WYSIWYG image of whats on the screen, or am I missing something?
Bruce.
Re: Saving Image as PNG no transparency
Hi
Strangely, although there is no transparency when saving an image as a PNG, you get a perfect copy with transparency if you copy to the clipboard.
Bruce.
Strangely, although there is no transparency when saving an image as a PNG, you get a perfect copy with transparency if you copy to the clipboard.
Bruce.
Re: Saving Image as PNG no transparency
Hello Bruce,
After doing many tests we can’t reproduce the problem you are experiencing using latest version of TeeChart Pro VCL/FMX 2014, build number 2014.11.1405, and code below:
Could you tell us which version are you using?
Thanks in advance,
After doing many tests we can’t reproduce the problem you are experiencing using latest version of TeeChart Pro VCL/FMX 2014, build number 2014.11.1405, and code below:
Code: Select all
uses VCLTee.TeePNG, VCLTee.Series, VCLTee.TeExport;
procedure TForm1.FormShow(Sender: TObject);
begin
Chart1.AddSeries(TBarSeries).FillSampleValues;
Chart1.Gradient.Visible:=false;
Chart1.Color := clNone;
Chart1.Series[0].Transparency := 50;
TeeSaveToPNG(Chart1, 'E:\tmp\Chart1Transparent.png');
end;
Thanks in advance,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Saving Image as PNG no transparency
Sandra
I am using TeeChart 9.20.
How do I check for the exact build number?
In my problem I am saving multiple images and the uploading them to my website and using a call like with a specific size:
And this fails, but if I don't specify the size and use the default size like in your example transparency works.
It also fails if you use and specify a size.
Bruce.
I am using TeeChart 9.20.
How do I check for the exact build number?
In my problem I am saving multiple images and the uploading them to my website and using a call like with a specific size:
Code: Select all
TeeSaveToPNG(Chart1,Path,1200,600)
Code: Select all
TeeSaveToPNG(Chart1,Path)
Code: Select all
TeeSaveToJPEG
Bruce.
Re: Saving Image as PNG no transparency
Hello Bruce,
Thanks for your information.
1.- Open your IDE, add Chart in the form and then do click on chart with right button and choose About TeeChart.
Also, I have checked again, the transparency problem you are experiencing with PNG and JPEG, and it doesn't appear for us using latest Teechart Pro VCL/FMX and code below:
I would like suggest you, if you doesn't use the latest version of TeeChart Pro VCL/FMX, download our trial version and check my code again. You can download the trial version from here.
Thanks in advance,
Thanks for your information.
To check the exact build number, the easiest way is next:How do I check for the exact build number?
1.- Open your IDE, add Chart in the form and then do click on chart with right button and choose About TeeChart.
Also, I have checked again, the transparency problem you are experiencing with PNG and JPEG, and it doesn't appear for us using latest Teechart Pro VCL/FMX and code below:
Code: Select all
uses VCLTee.TeePNG, VCLTee.TeeJPEG, VCLTee.Series, VCLTee.TeExport;
procedure TForm1.FormShow(Sender: TObject);
begin
Chart1.AddSeries(TBarSeries).FillSampleValues;
Chart1.Gradient.Visible:=false;
Chart1.Color := clNone;
Chart1.Series[0].Transparency := 50;
TeeSaveToPNG(Chart1, 'E:\tmp\Chart1Transparent.png',1200,600);
TeeSaveToJPEG(Chart1,'E:\tmp\Chart1Transparent.jpeg',1200,600);
end;
Thanks in advance,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Saving Image as PNG no transparency
Sandra
Thanks for the advice, but it does look like that I am using the latest version of TeeChart,
and rather than screw up TeeChart on my new XE6 development system, I would rather wait until you release a full update. I say this because I did the same thing when I purchased TeeChart v8 for Delphi 2007 version a few years ago, and had all sorts of problems even though I was reassured that it wouldn't.
Do you have any idea when you are going to release an update?
Bruce.
Thanks for the advice, but it does look like that I am using the latest version of TeeChart,
and rather than screw up TeeChart on my new XE6 development system, I would rather wait until you release a full update. I say this because I did the same thing when I purchased TeeChart v8 for Delphi 2007 version a few years ago, and had all sorts of problems even though I was reassured that it wouldn't.
Do you have any idea when you are going to release an update?
Bruce.
Re: Saving Image as PNG no transparency
Hello Bruce,
Thanks for your information. We can not reproduce your problem using latest version of Teechart Pro VCL/FMX 2014 for XE6 and the previous code we attached you. Could you confirm us that if you use my previous code you can reproduce the problem?
Also, we would very grateful if you can send us a simple project, where we can reproduce exactly the problem here because we can find a solution.
Sorry for the inconveniences the problem can cause you.
Thanks in advance,
Thanks for your information. We can not reproduce your problem using latest version of Teechart Pro VCL/FMX 2014 for XE6 and the previous code we attached you. Could you confirm us that if you use my previous code you can reproduce the problem?
Also, we would very grateful if you can send us a simple project, where we can reproduce exactly the problem here because we can find a solution.
Sorry for the inconveniences the problem can cause you.
Thanks in advance,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Saving Image as PNG no transparency
Sandra
This gets better I have added the code you supplied to a project:
The result did have transparent bars yes, but...
Is the version of TeeChart that I'm using the latest version or not (2014.11.140512)?
I installed XE6 the week before I added TeeChart 2014 on a Windows 7 PC.
This gets better I have added the code you supplied to a project:
Code: Select all
unit Main;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, VCLTee.Series, VCLTee.TeEngine, Vcl.ExtCtrls, VCLTee.TeeProcs, VCLTee.Chart,
VCLTee.StatChar, Vcl.StdCtrls, VCLTee.TeePNG, VCLTee.TeExport;
type
TfmMain = class(TForm)
Chart1: TChart;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
fmMain: TfmMain;
implementation
{$R *.dfm}
procedure TfmMain.FormCreate(Sender: TObject);
begin
Chart1.AddSeries(TBarSeries).FillSampleValues;
Chart1.Gradient.Visible:=false;
Chart1.Color := clNone;
Chart1.Series[0].Transparency := 50;
TeeSaveToPNG(Chart1, 'C:\Temp\Chart1Transparent.png');
end;
end.
Is the version of TeeChart that I'm using the latest version or not (2014.11.140512)?
I installed XE6 the week before I added TeeChart 2014 on a Windows 7 PC.
Re: Saving Image as PNG no transparency
Shall I zip up the project and send it you?
Re: Saving Image as PNG no transparency
Hello Bruce,
Thanks in advance,
Yes, we would be very grateful if you will attach the project for us.Shall I zip up the project and send it you?
Thanks in advance,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Saving Image as PNG no transparency
Hi
Here it is.
Bruce.
Here it is.
Bruce.
- Attachments
-
- Steema.zip
- (90.84 KiB) Downloaded 871 times
Re: Saving Image as PNG no transparency
Hello Metman,
Thanks for your project. We are investigating with the problem you experiencing and we try to give you a good answer in short time as possible.
Thanks in advance,
Thanks for your project. We are investigating with the problem you experiencing and we try to give you a good answer in short time as possible.
Thanks in advance,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |