Description of SaveFlxImgs

Home > BiKEGG > SaveFlxImgs.m

# SaveFlxImgs

## PURPOSE

SavFlxImgs

## SYNOPSIS

function SaveFlxImgs (hax,FolderPath,k,ImgRes,ImgFrmt)

## DESCRIPTION

     SavFlxImgs
     employs following input to export created maps as image files:
     1- hax- Handle to current axes
     2- FolderPath- Target folder for images to be saved
     3- k- A counter, used for image numbering
     4- ImgRes- Output image resolution
     5- ImgFrmt- Output image format

## CROSS-REFERENCE INFORMATION

This function calls:

This function is called by:

- KeggDraw KeggDraw
- NetDraw NetDraw

## SOURCE CODE

    0001 function SaveFlxImgs (hax,FolderPath,k,ImgRes,ImgFrmt)
    0002 % SavFlxImgs
    0003 % employs following input to export created maps as image files:
    0004 % 1- hax- Handle to current axes
    0005 % 2- FolderPath- Target folder for images to be saved
    0006 % 3- k- A counter, used for image numbering
    0007 % 4- ImgRes- Output image resolution
    0008 % 5- ImgFrmt- Output image format
    0009
    0010 % O. Jamialahmadi
    0011 % TMU, Chem. Eng. Dept., Biotech. Group
    0012 % Mar. 2015
    0013
    0014 FrmDat={'PNG';'JPEG';'BMP';'TIFF';'PDF'};
    0015 ResDat={'300','350','400','450','500','550','600','1200'};
    0016 FrmSp={'-dpng';'-djpeg';'-dbmp';'-dtiff';'-dpdf'};
    0017 if isempty(ImgRes) || isempty(ImgFrmt)
    0018     ImgRes=1;
    0019     ImgFrmt=1;
    0020 end
    0021 Res1=ResDat{ImgRes};
    0022 Frm1=FrmDat{ImgFrmt};
    0023 Res=['-r',Res1];
    0024 Frmt=FrmSp{ImgFrmt};
    0025 ImgNm=['Image ',num2str(k),'.',lower(Frm1)];
    0026 FileNm=fullfile(FolderPath,ImgNm);
    0027 set(gcf,'PaperPositionMode','auto')
    0028 print (hax,Res,Frmt,FileNm);