Displaying image is not working anymore #19919

Open
opened 2026-01-31 06:57:26 +00:00 by claunia · 0 comments
Owner

Originally created by @koszeggy on GitHub (May 22, 2023).

Windows Terminal version

All versions

Windows build number

Not relevant

Other Software

No response

Steps to reproduce

Remark: I'm not requesting a new feature here. Though displaying images in Windows Console never has been supported officially, it was definitely possible and it was working since Windows XP until up to Windows 10 and even ConEmu emulates this behavior. This issue has been created from my comment originally posted under #5746, which is a new feature request to support displaying images.

To reproduce the issue you can use the code snippet in a .NET Console application from here or execute a Far Manager console application with Image Viewer plugin.

Expected Behavior

The linked example for .NET should produce a result like this:
Image in Windows Console

And the aforementioned Far Manager application with the Image Viewer plugin used to work like this:
Image in pre-Windows 11 console window

Actual Behavior

The new Windows 11 Terminal apparently does not support this anymore, the images are simply not appearing.

I don't know what's missing to make it work again because GetConsoleWindow still returns the console handle as a Win32 HWND and even the Graphics::FromHWND method returns a seemingly valid instance, it's just its VisibleClipBounds is always an empty rectangle.

Originally created by @koszeggy on GitHub (May 22, 2023). ### Windows Terminal version All versions ### Windows build number Not relevant ### Other Software _No response_ ### Steps to reproduce **Remark:** I'm not requesting a new feature here. Though displaying images in Windows Console never has been supported officially, it was definitely [possible](https://stackoverflow.com/a/33652557/5114784) and it was working since Windows XP until up to Windows 10 and even [ConEmu](https://conemu.github.io/en/Screenshots.html) emulates this behavior. This issue has been created from my [comment](https://github.com/microsoft/terminal/issues/5746#issuecomment-1356367205) originally posted under #5746, which is a new feature request to support displaying images. To reproduce the issue you can use the code snippet in a .NET Console application from [here](https://stackoverflow.com/a/33652557/5114784) or execute a [Far Manager](https://www.farmanager.com/download.php?l=en) console application with [Image Viewer](https://plugring.farmanager.com/plugin.php?pid=874&l=en) plugin. ### Expected Behavior The [linked example](https://stackoverflow.com/a/33652557/5114784) for .NET should produce a result like this: ![Image in Windows Console](https://i.stack.imgur.com/oXH3y.png) And the aforementioned Far Manager application with the Image Viewer plugin used to work like this: ![Image in pre-Windows 11 console window](https://farplugs.sourceforge.io/img/imageview.png) ### Actual Behavior The new Windows 11 Terminal apparently does not support this anymore, the images are simply not appearing. I don't know what's missing to make it work again because [`GetConsoleWindow`](https://learn.microsoft.com/en-us/windows/console/getconsolewindow) still returns the console handle as a Win32 HWND and even the [Graphics::FromHWND](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusgraphics/nf-gdiplusgraphics-graphics-fromhwnd) method returns a seemingly valid instance, it's just its [VisibleClipBounds](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusgraphics/nf-gdiplusgraphics-graphics-getvisibleclipbounds(rect)) is always an empty rectangle.
claunia added the Needs-TriageIssue-BugResolution-Won't-Fix labels 2026-01-31 06:57:26 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19919