Join 34,000+ subscribers and receive articles from our
blog about software quality, testing, QA and security.

How to add a jpg image to the log?


#1

I see that LogBitmap expect a TBitmap.
How can I add a jpg image to the log, which the viewer will display?
A TBitmap is just too big to add when it is a screenshot of a 1920x1080 screen.


#2

Hello!

You can just use LogJpeg for this. This functions expects a TJpegImage object and displays it in the same viewer as the bitmap function. There are also LogJpegFile and LogJpegStream functions for logging jpeg files or streams, respectively.

Regards,
Tobias


#3

[quote=tgurock]Hello!

You can just use LogJpeg for this. This functions expects a TJpegImage object and displays it in the same viewer as the bitmap function. There are also LogJpegFile and LogJpegStream functions for logging jpeg files or streams, respectively.

Regards,
Tobias[/quote]

I must have been blind, did not see the functions :confused:
Sorry to waste your time with that :slight_smile:


#4

Don’t worry, I’m happy to help. Have a nice weekend! :slight_smile:

Regards,
Tobias