imageHeigth method

  1. @DefineMethod(name: 'image-height')
Dimension imageHeigth (Quoted filePathNode)
@DefineMethod(name: 'image-height')

Gets the image height from a file.

Parameters: string: the file to get the dimensions for. Returns: dimension Example: image-height("file.png"); Output: 10px

Implementation

@DefineMethod(name: 'image-height')
Dimension imageHeigth(Quoted filePathNode) {
  final ImageDimension size = imageSizeFtn(filePathNode);
  return size == null ? null : Dimension(size.height, 'px');

//2.4.0 20150321
//  "image-height": function(filePathNode) {
//      var size = imageSize(this, filePathNode);
//      return new Dimension(size.height, "px");
//  }
}