I want a square window, but I don't want the image to fit the window, I want it to either scale to height or scale to width. Example:
image = cv.imread("image.png")
width = 300
height = 70
dim = (width, height)
resized = cv.resize(image, dim, interpolation =cv.INTER_AREA)
cv.namedWindow("image", cv.WINDOW_NORMAL)
cv.resizeWindow("image", 300, 300)
cv.moveWindow("image", 50, 50)
cv.imshow("image", resized)
I want a 300x70 image centered inside a 300x300 window, but every time I try it, the image gets stretched kind of like this:
vs