Dear SAS community,
Is there a way to automate re-sizing of images using ods layout?
Image urls are stored in a variable image_url in a sas data set, and contain links to images on the web. I am reading in image_url the following way: obj.image(file: strip(image_url), and would like the image to be scaled down.
Here is the code:
data _null_;
set r end=eof;
if _n_=1 then
do;
dcl odsout obj();
obj.layout_gridded(columns: 2 ,
overrides: "just=left");
end;
obj.region(width: "2in", height:"1in");
obj.format_text(data: '^{style [color=dagr fontsize=4 just=right]Available on} '||
'^{style [color=cx1b3564 fontsize=4 textdecoration=underline font_weight=bold just=right url="www.site.com"]Site Name}',
overrides: "just=left width=100pct background=white fontsize=5 color=dagr ");
obj.image(file: strip(image_url),
overrides: "just=left ");
if eof ne 1 then
obj.format_text(data: " ");
else
obj.layout_end();
run;
Regards,
renatasas
auto- image reszing and image scaling with c# is quite familiar to me, dos layout is not, thank for sharing.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.