CxImage is used for image conversion for clipboard support. CxImage have currently some issue: - library is old and unsupported; - required an old libpng library. Currently the MingW binary we distribute due to some issue have PNG disabled (so no clipboard image support). Note that currently we support (before and after this patch) only BMP and PNG. PNG is required as the default agent format. However Windows programs wants to have BMP (specifically DIB) in the clipboard. This patch remove CxImage and use directly libpng (BMP is supported directly by Windows APIs). Tested with various formats and the compiled agent with a Linux client. The main concern is actually the possible problem to support some weird/old BMP file formats however I don't think any actual program will handle BMP2 (BMP3 was introduced with Windows 3 probably 30 years ago).
The test patch add a test helper executable and a script to test PNG encoding. Changes since v3: - reuse code to compute DIB stride; - update documentation comments; - update copyright lines. Changes since v2: - updated copyright lines; - update some function documentation; - fixed 2 bit PNGs; - removed RFC from tests; - improved test adding different images; - merged Uri fix for memory. Frediano Ziglio (5): Move image handling to a separate file Initial rewrite of image conversion code Write code to decode PNG format Support encoding PNG images Add test for PNG files Makefile.am | 28 +++- configure.ac | 5 +- mingw-spice-vdagent.spec.in | 2 - test-png | 50 ++++++ vdagent/image.cpp | 174 +++++++++++++++++++++ vdagent/image.h | 69 +++++++++ vdagent/imagepng.cpp | 368 ++++++++++++++++++++++++++++++++++++++++++++ vdagent/imagepng.h | 25 +++ vdagent/imagetest.cpp | 79 ++++++++++ vdagent/vdagent.cpp | 57 +------ 10 files changed, 802 insertions(+), 55 deletions(-) create mode 100755 test-png create mode 100644 vdagent/image.cpp create mode 100644 vdagent/image.h create mode 100644 vdagent/imagepng.cpp create mode 100644 vdagent/imagepng.h create mode 100644 vdagent/imagetest.cpp -- 2.13.3 _______________________________________________ Spice-devel mailing list Spicefirstname.lastname@example.org https://lists.freedesktop.org/mailman/listinfo/spice-devel