I have the following problems, i need to import big png and also, i want to define the new dimension of the picture to include it in a RTF
How can i do ?
What's the simpliest way to do that ?
I would not have hard coding because it's in a macro program
Thank you for your help and let's go france for the world cup :-)
What do you mean by "import"?? Where do you envision the "import" happening?? SAS has a couple of different graphics editors, however, they are both interactive editors and, as far as I know, cannot be used from within a program. I suppose you could try to replay your image into a different size using GREPLAY, but that seems like an iffy proposition when so many other tools are more suited to resizing.
If SAS/GRAPH created the PNG, then I would suggest that you recreate the graph using the original program code and by changing the code to use the dimensions you want.
If SAS/GRAPH did not create the PNG file, then using a 3rd party graphics editor (such as PhotoShop, PaintShop Pro or even Windows Paint) are probably better tools for resizing images.
How is your RTF file being created? Let's say that you are using ODS to create an RTF file and you want an externally created PNG file to use as a logo -- I would then:
1) resize the image to the size needed using an external 3rd party graphics editor
2) use the PREIMAGE style attribute to insert the logo into the ODS RTF file --when the RTF file is being created --
If, on the other hand, you have an -existing- RTF file and you want to insert an image into an existing RTF file, then this is a different task that most likely will involve post-processing the RTF file with a program (because ODS cannot append or "insert" into an existing RTF file).
I understand that you do not want to have hard-coding (such as for the PNG name???), however, the process of editing the PNG image to be a different size is most likely going to be a manual process and about the only thing you're going to be able to do is macro-ize the image name for use in the PREIMAGE style attribute (either in a style template or in PROC REPORT, PRINT or TABULATE syntax).