Page 6 of 6

Re: CmdBkg - use bitmap as background to console window

Posted: 14 May 2021 12:33
by aGerman
Unfortunately there is no possiblity. The way CmdBkg works is like that:
There are two windows. The foreground window is the console window which displays the text. The background window displays the image and it lays behind the console window (following the position and size updates of the console window). In order to make the background even visible, the console window in the foreground must be transparent to a certain extend. But this means that also the text is getting transparent to the same degree.

You may want to have a look at the new Windows Terminal It supports a lot of settings and visual effects.


Re: CmdBkg - use bitmap as background to console window

Posted: 18 Jul 2021 07:03
by aGerman
A few weeks ago I had an idea of how to overcome the issue explained above. There's an undocumented API for an acrylic (blurred) background. So, rather than making the console window transparent we could optionally use this effect. That feature is not downward compatible though. As to the little I've found in the internet, it seems to be available since Win10 v.1803.
In the attached beta of version 3 it comes true. There's an additional option /a for "Acrylic" (ignored on versions older than 1803 to prevent the app from crashing). If this is specified, option /t is used for alpha-blending with black, rather than for making the console opaque.
From the help message:

Code: Select all

  /a  Acrylic background, only Windows 10 v. 1803 (10.0.17134) onwards.
      If specified, option /t will be used for alpha blending with black:
       For a console background set to black
         0 yields a dark grayish background image with almost no color contrast
        33 yields a acrylic, grayish background image with low color contrast
        99 yields a acrylic background image with high color contrast
       100 yields the original background image
If Mikael finds it reasonable he might make an official release.

The API is a little buggy if used along with the Acrylic effect. Especially window moving is laggy.
The additional /g option adds a Frosted Glass effect. It's similar to Acrylic but has a lower blur radius.
- works on Win 10 before 1803
- dragging isn't laggy
- due to the lower blur radius, the background is more recognizable than Acrylic
- the background is still blur using /t 100

screenshot.jpg (50.03 KiB) Viewed 92 times