• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[Solved] How to display images without stretching?

Level 20
Joined
Nov 17, 2019
Messages
208
Hi everyone! I'm trying to show a 1024x1024 picture in my custom map to the player, but when I do it with the "Cinematic - Apply a filter" trigger, the picture gets stretched to fill the screen. My question is: Is there any way to show pictures to the player, without stretching it to fill the screen?
 
Level 12
Joined
Jan 10, 2023
Messages
191
There might be a better way, but you could locally check the resolution and then make the image have an appropriately sized alpha (transparent) border.

You would need several pictures, maybe not necessarily one for each display resolution, and then you would need to locally determine the size of each display and them locally change the image file's address (imported file's address) in a string variable, then show that image using the localized string as a directory and each display will have the appropriate file path for their image.

Not sure the best way to implement it, but I think that's an option.
 
Level 25
Joined
Sep 26, 2009
Messages
2,383
You could just create the image with a 4:3 ratio, where the 1024x1024 part will be centered and the remaining part of the image will be transparent.
That's how Blizz did it in the blood elf campaign's secret map, where you see Pandarens upon win
  • Cinematic - Apply a filter over 1.00 seconds using Normal blending on texture Panda-n-Cub, starting with color (100.00%, 100.00%, 100.00%) and 0.00% transparency and ending with color (0.00%, 0.00%, 0.00%) and 0.00% transparency
 
Top