Gallery.Image.Resolution

Version: - double  

Summary

Returns the resolution of the image.

Settings

The value is generated automatically.

Remarks

Using this tag will result in slower performance if using large original images (i.e. over 2000 px in width or 1 mb in size).

Examples

Outputting the template tag

@GetDouble("Gallery.Image.Resolution")
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Check if tag has a value

@if(!double.IsNullOrWhiteSpace(GetDouble("Gallery.Image.Resolution"))) {
@* Tag has value, so let's do something useful here. *@
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Assign tag to a value for later use

@{
double storedTag = GetDouble("Gallery.Image.Resolution");
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Outputting the template tag

<!--@Gallery.Image.Resolution-->
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Check if double has a value

<!--@If Defined(@Gallery.Image.Resolution)-->
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX