ImageProperties Table Viewer Example

The following example demonstrates the use of ImageProperties to list the properties of all images in a folder while adding relatively simple table formatting. 

Smartsite SXML CopyCode image Copy Code
<se:xlinks parent="26199" save="imgs" resulttype="datatable"/>

<se:imageproperties inputdata="imgs" >
    <se:parameters>
        <se:parameter name="format">
            <se:rowformat>
                <se:colformat expression="this.colname() != Metadata">{char.tab()}{char.tab()}<td>{this.field()}</td>{char.crlf()}</se:colformat>
                <se:rowresult>{char.tab()}<tr>{this.rowresult()}</tr>{char.crlf()}</se:rowresult>
            </se:rowformat>
            <se:captionformat match="first">
                <se:colformat expression="this.colname() != Metadata">{char.tab()}{char.tab()}<th>{this.colname()}</th>{char.crlf()}</se:colformat>
                <se:rowresult>{char.tab()}<tr>{this.rowresult()}</tr>{char.crlf()}</se:rowresult>
                </se:captionformat>
            </se:parameter>
        <se:parameter name="resultformat"><table>{this.result()}</table></se:parameter>
        </se:parameters>    
</se:imageproperties>
Example Result CopyCode image Copy Code
<table>    <tr>        <th>FileName</th>
        <th>FileType</th>
        <th>Folder</th>
        <th>FileSize</th>
        <th>FileSizeKb</th>
        <th>Width</th>
        <th>Height</th>
        <th>ColorDepth</th>
        <th>FrameCount</th>
        <th>ResolutionUnit</th>
        <th>ResolutionX</th>
        <th>ResolutionY</th>
        <th>Location</th>
</tr>
    <tr>        <td>Bike.jpg</td>
        <td>jpg</td>
        <td></td>
        <td>366938</td>
        <td>358.34 kB</td>
        <td>600</td>
        <td>400</td>
        <td>24</td>
        <td>1</td>
        <td>DotsPerInch</td>
        <td>96</td>
        <td>96</td>
        <td>/doc/Data_used_by_Code_Examples/Macro_example_helper_items/Images/bikejpg.jpg</td>
</tr>
    <tr>        <td>CarInSnow.jpg</td>
        <td>jpg</td>
        <td></td>
        <td>81529</td>
        <td>79.62 kB</td>
        <td>500</td>
        <td>332</td>
        <td>24</td>
        <td>1</td>
        <td>DotsPerInch</td>
        <td>72</td>
        <td>72</td>
        <td>/doc/Data_used_by_Code_Examples/Macro_example_helper_items/Images/CarInSnowjpg.jpg</td>
</tr>
    <tr>        <td>Flower.jpg</td>
        <td>jpg</td>
        <td></td>
        <td>32764</td>
        <td>32 kB</td>
        <td>480</td>
        <td>360</td>
        <td>24</td>
        <td>1</td>
        <td>DotsPerInch</td>
        <td>72</td>
        <td>72</td>
        <td>/doc/Data_used_by_Code_Examples/Macro_example_helper_items/Images/Flowerjpg.jpg</td>
</tr>
    <tr>        <td>OrangeFlower.jpg</td>
        <td>jpg</td>
        <td></td>
        <td>196016</td>
        <td>191.42 kB</td>
        <td>1024</td>
        <td>1053</td>
        <td>24</td>
        <td>1</td>
        <td>DotsPerInch</td>
        <td>72</td>
        <td>72</td>
        <td>/doc/Data_used_by_Code_Examples/Macro_example_helper_items/Images/OrangeFlowerjpg.jpg</td>
</tr>
</table>