# padToSquare | @vladmandic/face-api - v1.7.8
Documentation for @vladmandic/face-api - v1.7.8

# Function padToSquare

- padToSquare(imgTensor: Tensor4D, isCenterImage?: boolean): tf.Tensor4D

- Pads the smaller dimension of an image tensor with zeros, such that width === height.

  ### Returns

  The padded tensor with width === height.

  #### Parameters

  - ##### imgTensor: Tensor4D

    The image tensor.

  - ##### isCenterImage: boolean = false

    (optional, default: false) If true, add an equal amount of padding on both sides of the minor dimension oof the image.

  #### Returns tf.Tensor4D

  - Defined in ops/padToSquare.ts:11