There is GDI+ in the console program
asm-file;; CONSOLE #
include win64a.inc
includelib winmm.lib
include winmm.inc
include gdiplus.inc
includelib gdiplus.lib
MAXSCREENX = 600/8
MAXSCREENY = 315/12
.code
WinMain proc
local result:qword
local hIn:qword
local IDtimer:qword
local ConsoleWindow:SMALL_RECT
local cci:CONSOLE_CURSOR_INFO
local MOUSE_KEY:INPUT_RECORD
invoke FreeConsole ;release the existing console
invoke AllocConsole ;create the console
invoke GetStdHandle,STD_INPUT_HANDLE
mov hIn,rax ; receive handle for a input
invoke GetStdHandle,STD_OUTPUT_HANDLE
mov hOut,rax ; receive handle for a output
invoke GetLargestConsoleWindowSize,eax
; eax return in 31-16 bits: dwCoord.y
; 15-00 bits: dwCoord.x
lea r8d,ConsoleWindow ; lpConsoleWindow
and dword ptr [r8],0
;ConsoleWindow.Left = 0 ConsoleWindow.Top = 0
sub ax, MAXSCREENX
sbb edx, edx
and ax, dx
add ax, MAXSCREENX-1
mov [r8+SMALL_RECT.Right],ax
shr eax, 16
sub eax, MAXSCREENY
sbb edx, edx
and eax, edx
add eax, MAXSCREENY-1
mov [r8+SMALL_RECT.Bottom],ax
invoke SetConsoleWindowInfo,hOut,TRUE
invoke SetConsoleScreenBufferSize,hOut,MAXSCREENY*10000h+MAXSCREENX ; establish the new size of console window
; initialise GDIPlus
mov ecx,offset graphics
mov edx,offset gdii
invoke GdiplusStartup,,,0
invoke SetConsoleTitle,&NameConsole ;definition of a title bar
invoke timeSetEvent,200,0,&TIME,0,TIME_PERIODIC
mov IDTimer,rax
invoke SetConsoleCursorPosition,hOut,0;Y=0 X=0
invoke WriteConsole,hOut,&STR1,sizeof STR1,&result,0
invoke GetConsoleWindow
mov hWnd,rax
invoke GetDC,rax ;получить DC
mov hDC,rax
lea edx,gdiHgraphics
invoke GdipCreateFromHDC,eax; Get graphics "object" from DC handle
mov ecx,offset FileNameU
invoke GdipLoadImageFromFile,,ADDR gdiHbitmap ; Open JPEG file
@@: invoke ReadConsoleInput,hIn,&MOUSE_KEY,1,&result
lea edx,MOUSE_KEY
cmp [rdx+INPUT_RECORD.EventType],MOUSE_EVENT
je @b
cmp [rdx+INPUT_RECORD.EventType],KEY_EVENT
jne @b
cmp [rdx+INPUT_RECORD.KeyEvent.wVirtualKeyCode],VK_ESCAPE
jne @b
invoke ReleaseDC,hWnd,hDC ;free hDC
invoke timeKillEvent,IDTimer
invoke FreeConsole ;close console
invoke GdiplusShutdown,graphics ; cleanup on exit
invoke RtlExitUserProcess,NULL
WinMain endp
TIME proc
local dummy:qword
invoke GdipDrawImageI,gdiHgraphics, gdiHbitmap,0,15
leave
retn
TIME endp
;----------------------------------------
hDC dq ?
hWnd dq ?
gdiHbitmap dq ?
gdiHgraphics dq ?
gdii GdiplusStartupInput <1,0,0,0>
graphics dq ?
STR1 db 'For exit from program press ESC or CTRL+C or CTRL+Break'
NameConsole db 'JPG Image in Console',0
hOut dq ?
FileNameU: du <background.jpg>
IDTimer dq ?
end
There are asm-/jpg-/exe-files in attachment