Main Content

getImageReporter

Class:mlreportgen.report.TitlePage
Package:mlreportgen.report

Get title page image reporter

Syntax

reporter = getImageReporter(tp)

Description

reporter= getImageReporter(tp)returns a reporter that theTitlePagereporter (tp) uses to format the image specified by theImageproperty. You usegetImageReporterto customize the image position and alignment.

Input Arguments

expand all

Title page of the report, specified as a title page reporter object. To create thetpinput, you usemlreportgen.report.TitlePage.

Output Arguments

expand all

Title page image reporter, returned as a reporter object.

Examples

使用默认的标题页图像风格

Create a style for the image on your title page that differs from the default. Before you run this example, create a template file namedMyTitlePageTemplateand customize itsTitlePageImagestyle. Then, usegetImageReporterand theTemplateSrcproperty to use your template.

importmlreportgen.report.*rpt = Report(); tp = TitlePage(); tp.Image ='myImage.jpg'; tp.Image = getImageReporter(tp); tp.Image.TemplateSrc ='MyTitlePageTemplate'; add(rpt,tp);

Version History

Introduced in R2017b