euporie.core.widgets.display.pixels_to_cell_size

euporie.core.widgets.display.pixels_to_cell_size(px: int | None = None, py: int | None = None) tuple[int, float]

Get the cell width and aspect ration of a pixel dimension.

Parameters
  • px – The desired pixel width of the data if known

  • py – The pixel height of the data if known

Returns

A tuple of the data’s width in terminal columns and its aspect ratio, when

converted to a image.