HEIF: Resolve primary image index from image source


The primary image, in the case of multi-image sources, may not
necessarily be the first image.

Test images produced with patched version of enc-heif that
allowed overriding the primary image. The correct primary
image is green, while the other image is red.

Pick-to: 6.10
Change-Id: Iba26b13fdb4898d7babc5fb173ad38b16f864e80
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
commit1bf5692d3f2215e7e147a529aec07b009cf19587
parent6e8f8c822865c95a5d3dbae02681bf0f3cd77b5a
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>
commit timeFri, 22 Aug 2025 14:16:03 +0200