Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2534 - Chart1.SaveToMetafile() produces PNG file
Summary: Chart1.SaveToMetafile() produces PNG file
Status: RESOLVED NOTABUG
Alias: None
Product: FireMonkey TeeChart
Classification: Unclassified
Component: Chart (show other bugs)
Version: 34.220203
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-31 11:37 EDT by Joachim Magera
Modified: 2022-09-23 06:19 EDT (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joachim Magera 2022-05-31 11:37:19 EDT
Chart1.SaveToMetafile(Filename)

and 

   Chart1.SaveToMetafileEnh(Filename) 

does produce simple PNG file
Comment 1 yeray alonso 2022-09-23 05:35:37 EDT
I've done an example, exporting a simple chart to both formats:

  SaveToMetafile('example.wmf');
  SaveToMetafileEnh('example.emf');

When I open them with IrfanView, and I open their "Information", it tells me they are "Windows Metafile (Aldus)" and "Windows Metafile (Enhanced)".

Also, if I rename those files to .png, when I try to open them in IrfanView, it alerts me they are metafiles with the wrong extension and suggests me to correct it.

I'm closing this as "not a bug" because I can't reproduce it.
I'll be happy to reopen it I can reproduce it.
Comment 2 yeray alonso 2022-09-23 05:40:46 EDT
Sorry, I was testing it in VCL.
I could reproduce with the same code in FMX so I've reopened it.
Comment 3 yeray alonso 2022-09-23 06:19:53 EDT
VCL's export to metafile uses Vcl.Graphics.TMetafile from Embarcadero which isn't ported to FMX.

To make TeeCreateMetafile to work on FMX (and SaveToMetafile, SaveToMetafileEnh and SaveToMetafileRect) we made our own TMetafile class inheriting Fmx.Graphics.TBitmap.

I'm closing this as "not a bug" because that was intended.
If Embarcadero ever adds an Fmx.Graphics.TMetafile, then we'll be able to rewrite this.