Define size for background image #3323

Open
opened 2026-01-30 23:18:36 +00:00 by claunia · 5 comments
Owner

Originally created by @sachabruttin on GitHub (Aug 9, 2019).

Originally assigned to: @cinnamon-msft on GitHub.

Description of the new feature/enhancement

As we are now able to define background image position using backgroundImageAlignment. It makes really easy to put an image to lower right of the terminal.
It will be very appreciated to also define the size of this image. It will help to place a large image in a corner of the terminal.

Proposed technical implementation details (optional)

Add properties into the profiles.json file: eg. backgroundImageWidth and backgroundImageHeight.

Originally created by @sachabruttin on GitHub (Aug 9, 2019). Originally assigned to: @cinnamon-msft on GitHub. <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> As we are now able to define background image position using `backgroundImageAlignment`. It makes really easy to put an image to lower right of the terminal. It will be very appreciated to also define the size of this image. It will help to place a large image in a corner of the terminal. # Proposed technical implementation details (optional) <!-- A clear and concise description of what you want to happen. --> Add properties into the profiles.json file: eg. `backgroundImageWidth` and `backgroundImageHeight`.
claunia added the Help WantedArea-SettingsIssue-TaskProduct-Terminal labels 2026-01-30 23:18:36 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Aug 9, 2019):

I’m not sure. With trivial access to image editing tools, you can make an image whatever size you want, can’t you?

@DHowett-MSFT commented on GitHub (Aug 9, 2019): I’m not sure. With trivial access to image editing tools, you can make an image whatever size you want, can’t you?
Author
Owner

@sachabruttin commented on GitHub (Aug 12, 2019):

Sure I can, but it is much easier to change settings to define what is the good size of an image. By the way, i'm also missing properties to define margin or padding for the image.

In the image it's an animated gif, I have no tool on my machine to resize it. I had to turn to an online converter. If I want to add border, I have no idea which tool to use :-(

image

@sachabruttin commented on GitHub (Aug 12, 2019): Sure I can, but it is much easier to change settings to define what is the good size of an image. By the way, i'm also missing properties to define margin or padding for the image. In the image it's an animated gif, I have no tool on my machine to resize it. I had to turn to an online converter. If I want to add border, I have no idea which tool to use :-( ![image](https://user-images.githubusercontent.com/2523409/62864152-3e5bbc00-bd0b-11e9-9e16-e43768e75c75.png)
Author
Owner

@trigger-segfault commented on GitHub (Aug 12, 2019):

As I can see, the pros are as follows:

  • Quality of life: On the fly image resizing when experimenting with the perfect background layout.
  • Easy to use: Allows for resizing animated gifs, which isn’t as easy as with static images.
  • Accessible: No requirements for external tools or websites to perform the resizing. This would benefit if Windows Terminal is being run on a work computer, and the user doesn’t have access to the tools (or maybe even websites) to resize an image.

The cons I see are:

  • Ambiguous: I’m assuming these proposed settings are designed to resize the base image. This is likely the easiest way to implement the feature as well. However, would it be confusing for the user when combining these image size settings with stretch mode?
  • Unnecessary: Image resizing can be performed with external tools. Unlike settings such as alignment, which are affected by dynamic window sizes and stretch mode, image size is something that is not affected by any of these in a way that requires the setting in order to obtain something new. This may be more relevant to #1936 where @zadjii-msft mentions that extensions could add background features that have less demand.

Animated Gif Resizing

There are cross platform tools such as FFmpeg and GIMP that support resizing animated gifs, although they may require looking up some examples.

Note on Padding

I do agree that a padding setting would be beneficial. The same display functionality cannot be completely mimicked through image manipulation and use of existing settings. However, again, image manipulation can closely mimic this as long as it’s acceptable for padding sizes to scale when using stretch modes other than none. Regardless, padding should be presented in its own issue.

@trigger-segfault commented on GitHub (Aug 12, 2019): **As I can see, the pros are as follows:** * Quality of life: *On the fly* image resizing when experimenting with the perfect background layout. * Easy to use: Allows for resizing animated gifs, which isn’t as easy as with static images. * Accessible: No requirements for external tools or websites to perform the resizing. This would benefit if Windows Terminal is being run on a work computer, and the user doesn’t have access to the tools (or maybe even websites) to resize an image. **The cons I see are:** * Ambiguous: I’m assuming these proposed settings are designed to resize the base image. This is likely the easiest way to implement the feature as well. However, would it be confusing for the user when combining these image size settings with stretch mode? * Unnecessary: Image resizing can be performed with external tools. Unlike settings such as alignment, which are affected by dynamic window sizes and stretch mode, image size is something that is not affected by any of these in a way that requires the setting in order to obtain something new. This may be more relevant to #1936 where @zadjii-msft mentions that [extensions could add background features that have less demand](https://github.com/microsoft/terminal/issues/1936#issuecomment-510942304). **Animated Gif Resizing** There are cross platform tools such as [FFmpeg](https://ffmpeg.org/) and [GIMP](https://www.gimp.org/downloads/) that support resizing animated gifs, although they may require looking up some [examples](https://superuser.com/questions/1362352/how-do-i-resize-an-animated-gif-and-keep-transparency). **Note on Padding** I do agree that a padding setting would be beneficial. The same display functionality cannot be completely mimicked through image manipulation and use of existing settings. However, again, image manipulation can closely mimic this as long as it’s acceptable for padding sizes to scale when using stretch modes other than `none`. Regardless, padding should be presented in its own issue.
Author
Owner

@SWB54 commented on GitHub (Apr 23, 2020):

When we define the background image size via this feature, we probably mean for that size to be interpreted as physical pixels. Currently, image dimensions are scaled according to the system UI scale (#5480).

@SWB54 commented on GitHub (Apr 23, 2020): When we define the background image size via this feature, we probably mean for that size to be interpreted as physical pixels. Currently, image dimensions are scaled according to the system UI scale (#5480).
Author
Owner

@DualBrain commented on GitHub (Sep 25, 2020):

I have two comments:

  1. In television there is the concept of a "bug" - a logo (image) that is displayed (typically) at the bottom right of the display. If there was a size mode that could be set to this, then it would automatically handle resize (as a percentage of the window) as well as any potential padding. Meaning, that this "area" would be fixed and whatever image you provide will be sized to this area - which the area would also resize in proportion to the current window size.

  2. The statement that this can be done using external tools doesn't address the fact that a console window can be resized and doesn't address those that have different machines with different monitor resolutions (laptop, desktop, remote desktop, etc.) - so resizing using external tools might address one machine and you'd not only have to have a different image per device, but potentially a different configuration setting for each device. It is my desire not to specify a pixel size... but a percentage of the window size - allowing for some semblance of device independence so that I can easily reuse the settings/images on multiple devices.

Thanks.

@DualBrain commented on GitHub (Sep 25, 2020): I have two comments: 1. In television there is the concept of a "bug" - a logo (image) that is displayed (typically) at the bottom right of the display. If there was a size mode that could be set to this, then it would automatically handle resize (as a percentage of the window) as well as any potential padding. Meaning, that this "area" would be fixed and whatever image you provide will be sized to this area - which the area would also resize in proportion to the current window size. 2. The statement that this can be done using external tools doesn't address the fact that a console window can be resized and doesn't address those that have different machines with different monitor resolutions (laptop, desktop, remote desktop, etc.) - so resizing using external tools might address one machine and you'd not only have to have a different image per device, but potentially a different configuration setting for each device. It is my desire not to specify a pixel size... but a percentage of the window size - allowing for some semblance of device independence so that I can easily reuse the settings/images on multiple devices. Thanks.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3323