Commit Graph

195 Commits

Author SHA1 Message Date
Jeff Smith 252a53825a gdiplus: Include palette when writing PNG indexed formats.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-29 19:50:43 +02:00
Jeff Smith f3c03ecb82 gdiplus/tests: Indicate which encoder failed when attempting to save image.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-29 19:50:38 +02:00
Dmitry Timoshkov 7eb1f5d6ad windowscodecs: Add initial implementation of the GIF encoder.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 21:36:12 +02:00
Thomas Faber 65c72c93ce gdiplus/tests: Disable double-freeing test.
Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-13 11:48:32 +02:00
Damjan Jovanovic 99a171981c gdiplus: In CompositingModeSourceCopy, fully transparent pixels are drawn black.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42585
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-05 20:21:29 +01:00
Florian Will a7fc06f62c gdiplus: Implement GdipSaveAddImage() and GdipSaveAdd().
Signed-off-by: Florian Will <florian.will@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-19 20:26:53 +01:00
Florian Will 21b62920f6 gdiplus/tests: Add multi-page tiff file saving test.
Also move the get_encoder_clsid() helper to the top of the file so it
can be used by the new test.

Signed-off-by: Florian Will <florian.will@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-19 20:01:22 +01:00
Jeff Smith ddd88fe2f4 gdiplus: Round up when converting from 32-bit ARGB to PARGB.
Applies fix from d23bfd8dfc to
setpixel_32bppPARGB.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-11 19:47:33 +01:00
Jeff Smith 06bf4283fb gdiplus: Fix calculation for 32-bit PARGB to ARGB conversion.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-11 19:47:25 +01:00
Dmitry Timoshkov cf6546fb3b gdiplus/tests: Add more tests for GdipCreateBitmapFromHBITMAP and palette images.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-27 18:27:17 +01:00
Damjan Jovanovic 3c8784bf9c gdiplus: GdipGraphicsClear() should overwrite pixels, not alpha blend.
All sample code in the Python Pyglet library suffers from terrible
text corruption, caused by the inability to erase the background
between rendering sequential font glyphs, resulting in leftovers
from previous letters mixing with the image of new letters.

This is because it attempts to erase the background by calling
GdipGraphicsClear() with ARGB color 0x00000000 (completely
transparent black), and in our gdiplus alpha blending that into
the background has no effect. It should be using
CompositeModeSourceCopy to overwrite the background with that brush
instead.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30506
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 21:01:59 +01:00
Damjan Jovanovic a16a4d9757 gdiplus: Start implementing CompositingModeSourceCopy.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30506
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 21:01:59 +01:00
Sven Baars 6a6376cd83 gdiplus/tests: Fix a memory leak (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 18:21:09 +01:00
Dmitry Timoshkov b7aa42c008 gdiplus/tests: Add some tests for GdipInitializePalette.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-31 18:13:18 +01:00
Nikolay Sivov a3ed938e4a gdiplus/tests: Add some missing return value checks (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-07 10:47:20 -06:00
Akihiro Sagawa 0e082c0416 gdiplus: Add 4bppIndexed to the list of supported formats.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-08 18:55:58 +01:00
Akihiro Sagawa 748a246a8d gdiplus: Convert to 32bppARGB when PNG image with transparency chunk is loaded. (rebased).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44409
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-08 18:55:42 +01:00
Akihiro Sagawa 5855ff7846 gdiplus/tests: Add more PNG color format tests.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-08 18:55:25 +01:00
Michael Stefaniuc 741037ca4b gdiplus/tests: Use the available ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-11 11:41:59 +02:00
Andrey Gusev 71e2c4b429 gdiplus/tests: Fix copy-paste typos.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-02 18:05:18 +01:00
Nikolay Sivov 279cad2352 gdiplus/tests: Add some invalid arguments tests for GdipLoadImageFromStream().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-28 19:39:28 +01:00
Nikolay Sivov b1ccf61f22 gdiplus/tests: Check more return values (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-30 20:44:33 +01:00
Nikolay Sivov ab31b59f45 gdiplus: Implement GdipSetImageAttributesNoOp.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-24 19:09:31 +02:00
Zebediah Figura 35dacf52dd gdiplus/tests: Mark broken bitmap background tests.
This bug is present in gdiplus.dll version 5.1 and absent in version 5.2.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-23 21:08:28 +02:00
Dmitry Timoshkov 8c593bd37a gdiplus: Set correct color space flags for grayscale images.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-29 15:51:27 +02:00
Dmitry Timoshkov 221c04d0df gdiplus/tests: Add a test for image flags to PNG grayscale image tests.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-29 15:51:27 +02:00
Dmitry Timoshkov 5870431ad9 gdiplus: Force conversion of 8 bpp grayscale PNG images to 32 bpp BGRA.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-25 08:06:35 +02:00
Dmitry Timoshkov ae65558ba1 gdiplus/tests: Add a test for loading PNG grayscale images.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 08:36:45 +09:00
Vincent Povirk 8f54e2034e gdiplus/tests: Enable floating point exceptions.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-26 10:10:10 +02:00
Piotr Caban e1006611cd gdiplus: Add GdipCreateHBITMAPFromBitmap tests when bitmap bits are locked.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-16 08:30:49 +01:00
Nikolay Sivov da2021e46f gdiplus: Return success from GdipImageSetAbort().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-04 18:42:39 +01:00
Nikolay Sivov 509ba80bcb gdiplus: Implement GdipBitmapGetHistogram().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-03 11:43:02 +01:00
Nikolay Sivov 8de0275e48 resend patch 1/2: Gdiplus: Implement GdipBitmapGetHistogramSize.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-03 11:42:50 +01:00
Dmitry Timoshkov 259837a199 gdiplus: Implement GdipGetMetafileHeaderFromMetafile.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-12 11:09:10 +09:00
Dmitry Timoshkov 2f7a2fdea3 gdiplus: Reimplement metafile loading using gdi32 instead of IPicture.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-22 12:39:12 +09:00
Michael Stefaniuc 5fce51236c gdiplus/tests: Make use of todo_wine_if().
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-05 14:50:30 -05:00
Vincent Povirk 7fbf0deede gdiplus: Implement GdipGetImageAttributesAdjustedPalette.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-14 12:16:59 +09:00
André Hentschel 1ff3264deb gdiplus/tests: Use todo_wine_if() in tests.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-16 12:09:39 +09:00
Thomas Faber 9b82368c36 gdiplus/tests: Fix build with MSVC.
VC 2010 can't initialize a structure with a structure.

Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-27 15:38:16 +09:00
Vincent Povirk 2dc5685897 gdiplus: Placeable is optional in GdipCreateMetafileFromWmf.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-03 13:47:56 +09:00
Vincent Povirk f6c104b322 gdiplus/tests: Add a test for CompositingModeSourceCopy.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-21 12:40:40 +09:00
Michael Stefaniuc 3708d53373 gdiplus/tests: Test the return of GdipImageSelectActiveFrame().
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-21 01:04:34 +09:00
Alistair Leslie-Hughes 71294e2a11 gdiplus: Add GdipCreateEffect tests.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-11 13:44:59 +09:00
Dmitry Timoshkov f78a6dd15c gdiplus: Move the burden of supporting GIF encoding to the WIC backend. 2015-07-14 14:41:47 +09:00
Vincent Povirk 2827a1a460 gdiplus: Fix leak in test in todo_wine case. 2015-03-19 14:05:35 +09:00
Piotr Caban 59eef10f34 gdiplus: Fixed palette flags setting. 2015-03-16 15:03:21 +09:00
Piotr Caban 3ece08ff4d gdiplus: Add pixel format test for transparent non-animated gif. 2015-03-13 21:52:53 +09:00
Piotr Caban a3822f973e gdiplus/tests: Add gif frames composition tests. 2015-03-13 21:52:49 +09:00
Piotr Caban 799362a0b7 gdiplus: Convert animated gif to PixelFormat32bppARGB on load. 2015-03-13 21:52:46 +09:00
Huw Davies 6df5ce7c9e gdiplus: Blend in the background colour. 2014-10-29 20:31:01 +09:00