def calculate_new_size(width, height)
      ratio  = width.to_f / height.to_f
      target = Gnawrnip.max_frame_size

      return [width, height] if target > [width, height].max

      if ratio < 1
        new_width  = target * ratio
        new_height = target
      else
        new_width  = target
        new_height = target / ratio
      end

      [new_width, new_height]
    end
def calculate_new_size(width, height)
      ratio  = width.to_f / height.to_f
      target = Gnawrnip.max_frame_size

      return [width, height] if target > [width, height].max

      if ratio < 1
        new_width  = target * ratio
        new_height = target
      else
        new_width  = target
        new_height = target / ratio
      end

      [new_width, new_height]
    end
Return new frame size (width and height).
 This size is keeping original aspect ratio.

 @return  [Array]  New width and height size. [width, height]