Jay-D
2nd April 2013, 12:09
Hi,
I want to resize an image with 4:3 aspect ratio and display it centered in a quadratic QGraphicsPixmapItem, thus having black bars above and below the image (letterbox). I know how to resize the image preserving its aspect ratio, but not how to center it on the PixmapItem and give the PixmapItem a black background or how to paste the resized image on a black quadratic image. Any suggestions?
Thanks in advance,
Jay-D
I want to resize an image with 4:3 aspect ratio and display it centered in a quadratic QGraphicsPixmapItem, thus having black bars above and below the image (letterbox). I know how to resize the image preserving its aspect ratio, but not how to center it on the PixmapItem and give the PixmapItem a black background or how to paste the resized image on a black quadratic image. Any suggestions?
Thanks in advance,
Jay-D