[Spice-devel] [vdagent-win PATCH v3 0/5] Rewrite image support
Frediano Ziglio
fziglio at redhat.com
Fri Jul 14 12:57:03 UTC 2017
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 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 | 184 ++++++++++++++++++++++
vdagent/image.h | 61 ++++++++
vdagent/imagepng.cpp | 368 ++++++++++++++++++++++++++++++++++++++++++++
vdagent/imagepng.h | 25 +++
vdagent/imagetest.cpp | 79 ++++++++++
vdagent/vdagent.cpp | 57 +------
10 files changed, 804 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.9.4
More information about the Spice-devel
mailing list