Commit Graph

289 Commits

Author SHA1 Message Date
Vincent Povirk 698fddf99b gdiplus: Properly clean up the new metafile data. 2011-06-22 11:25:46 +02:00
Vincent Povirk d436e51872 gdiplus: Add basic metafile recording support. 2011-05-23 11:15:41 +02:00
Marcus Meissner 4892adb414 gdiplus: Mark image_format_dimensions as static. 2011-05-18 10:54:32 +02:00
Vincent Povirk 1544640763 gdiplus: Add support for encoding TIFF images. 2011-04-11 19:32:53 +02:00
Vincent Povirk a7444e8e2c gdiplus: Use the given HPALETTE in GdipCreateBitmapFromHBITMAP. 2011-03-29 12:35:06 +02:00
Alexandre Julliard b3c333e916 gdiplus: Use signed types in convert_pixels to avoid problems on 64-bit. 2011-03-10 14:10:11 +01:00
Vincent Povirk 21d6fc9643 gdiplus: Implement ImageLockModeUserInputBuf. 2011-02-25 11:06:42 +01:00
Vincent Povirk 546b1a5cb4 gdiplus: Copy only the area requested when (un)locking bitmaps. 2011-02-25 11:06:36 +01:00
Vincent Povirk 9497e9380b gdiplus: Don't copy bits into the buffer when a bitmap is locked write-only. 2011-02-25 11:06:30 +01:00
Vincent Povirk 58eb96c9e7 gdiplus: Copy the bits on bitmap unlock if the write flag is set.
The read and write flags are independent, so a read flag being set doesn't
imply we can quit early.
2011-02-25 11:06:25 +01:00
Martin Petricek ee3c179026 gdiplus: Support for indexed formats in GdipBitmapSetPixel. 2011-01-12 15:02:38 +01:00
Vincent Povirk 32bbb0bbcf gdiplus: Correctly store the given stride in created bitmaps. 2010-11-12 17:47:43 +01:00
Vincent Povirk c8a48f237e gdiplus: Don't create a DIB section for non-alpha or reference bitmaps. 2010-10-01 13:44:39 +02:00
Vincent Povirk 9326fc13ca gdiplus: Don't try to free invalid or already-freed images. 2010-10-01 13:43:33 +02:00
Vincent Povirk 77a5b635aa gdiplus: Set flags and dpi when images are loaded. 2010-09-02 11:53:33 +02:00
Austin English 3745961b2e gdiplus: Add a stub for GdipConvertToEmfPlusToFile. 2010-08-24 15:22:29 +02:00
Vincent Povirk 517059f3f5 gdiplus: Set bitmap has alpha flag based on format. 2010-08-23 12:03:47 +02:00
Vincent Povirk 9a6eabf0b5 gdiplus: Create HBITMAP-less bitmap objects for exotic pixel formats. 2010-08-17 11:55:33 +02:00
Vincent Povirk 85a5710688 gdiplus: Don't require an HDC for the convert_unit function. 2010-08-17 11:55:33 +02:00
Vincent Povirk 3847c2dec9 gdiplus: Stub GdipGetMetafileHeaderFromStream. 2010-07-19 14:49:07 +02:00
Vincent Povirk 688eb0688b gdiplus: Stub GdipGetMetafileHeaderFromFile. 2010-07-19 14:49:07 +02:00
Vincent Povirk 2223900cf6 gdiplus: Stub GdipGetMetafileHeaderFromEmf. 2010-07-05 11:54:57 +02:00
Andrew Nguyen 6ea90c3c2e gdiplus: Add a few additional traces to gdiplus image functions. 2010-06-25 12:50:03 +02:00
Vincent Povirk 63fa6915ec gdiplus: Stub GdipGetEncoderParameterListSize. 2010-06-25 10:26:18 +02:00
Vincent Povirk 7dfc674437 gdiplus: Implement GdipGetImageThumbnail. 2010-05-10 10:02:11 +02:00
Vincent Povirk d2a01883fc gdiplus: Quiet the GdipImageForceValidation fixme. 2010-05-08 20:20:47 +02:00
Vincent Povirk 2dbc3980ef gdiplus: Implement GdipCreateHICONFromBitmap. 2010-05-08 19:25:32 +02:00
Vincent Povirk 38138784e7 gdiplus: Handle more cases in GdipCreateBitmapFromGdiDib. 2010-04-26 11:14:58 -05:00
Vincent Povirk 800e9ff6c5 gdiplus: Add test for GdipCreateBitmapFromGdiDib. 2010-04-26 11:14:53 -05:00
Vincent Povirk f2e3d99609 gdiplus: Implement GdipImageRotateFlip. 2010-03-31 11:41:13 +02:00
Vincent Povirk af7b8efc94 gdiplus: Store a reference to the image in image graphics contexts. 2010-03-29 12:19:38 +02:00
Mikhail Maroukhine 818ff38d62 gdiplus: Fix compiler warnings with flag -Wcast-qual. 2010-03-29 12:14:04 +02:00
Vincent Povirk d24a421207 gdiplus: Add support for decoding TIFF images. 2010-03-22 11:44:33 +01:00
Vincent Povirk 738059baf8 gdiplus: Support decoders with multiple signatures. 2010-03-22 11:44:24 +01:00
Justin Chevrier 818420a378 gdiplus: Basic implementation of GdipImageGetFrameCount with updated tests. 2010-03-16 12:29:14 +01:00
Vincent Povirk c1c555e3df gdiplus: Zero the MetafileHeader structure in GetMetafileHeader.
Since we return success, we should at least make sure the result is not
uninitialized memory.
2010-03-15 13:28:23 +01:00
Alasdair Sinclair 0ecd8daa16 gdiplus: Create a full BITMAPINFO to prevent clobbering memory with palette data. 2010-03-05 13:28:29 +01:00
Vincent Povirk ab124aa6b8 gdiplus: Stub GdipGetImageItemData. 2010-02-25 12:12:08 +01:00
Vincent Povirk f62560f76c gdiplus: Free the attached HBITMAP when destroying Bitmap objects. 2010-02-25 12:12:03 +01:00
Vincent Povirk 318ba28630 gdiplus: Don't use gdi32 to do pixel format conversion. 2010-02-08 17:14:43 +01:00
Vincent Povirk 4d53a4c9f5 gdiplus: Implement GetPixel for indexed color bitmaps. 2010-02-01 12:09:14 +01:00
Vincent Povirk 8be3e5cf29 gdiplus: Always trace pixel formats in hex. 2010-01-25 12:58:09 +01:00
Vincent Povirk 7afd9603b5 gdiplus: Reset the lock count when unlocking a bitmap in write mode. 2010-01-04 11:45:21 +01:00
Vincent Povirk 495c42b617 gdiplus: Add traces to unimplemented functions in image.c. 2010-01-04 11:45:07 +01:00
Vincent Povirk d694679ab6 gdiplus: Add trace to GdipBitmapUnlockBits. 2010-01-04 11:45:01 +01:00
Vincent Povirk 6bb300fa41 gdiplus: Implement GdipBitmapSetResolution. 2009-12-28 12:57:43 +01:00
Vincent Povirk 1aea88cac1 gdiplus: Implement GdipGetImage*Resolution. 2009-12-28 12:57:37 +01:00
Vincent Povirk d87b1d4980 gdiplus: Implement GdipImageGetFrameDimensionsList. 2009-12-28 11:55:20 +01:00
Vincent Povirk 7d62e1f776 gdiplus: Remove fixme from GdipImageGetFrameDimensionsCount. 2009-12-28 11:55:11 +01:00
Vincent Povirk f8ca372459 gdiplus: Add trace for values of new graphics and image objects. 2009-12-21 15:01:23 +01:00
Vincent Povirk 25dcd43e52 gdiplus: Support reading image data from device-dependent bitmaps. 2009-12-14 12:18:18 +01:00
Vincent Povirk 3424dac386 gdiplus: Explicitly copy the bits from dib sections to new bitmaps.
On Windows, GdipCreateBitmapFromHBITMAP creates a copy of the bitmap, not
a reference. Currently, we match this behavior, but this is only because
we cannot yet create bitmap objects that reference existing memory. If
GdipCreateBitmapFromScan0 were fixed to do this, FromHBITMAP would break.

Therefore, we always pass NULL to FromScan0 so that it allocates new memory
for the bitmap.
2009-12-14 12:18:10 +01:00
Vincent Povirk 6c040271c1 gdiplus: Initialize the palettes of new indexed bitmaps. 2009-12-14 12:04:04 +01:00
Vincent Povirk 9615dd8fdb gdiplus: Implement GdipGetImagePalette. 2009-12-14 12:04:03 +01:00
Vincent Povirk 59f45f2cbb gdiplus: Implement GdipGetImagePaletteSize. 2009-12-14 12:04:03 +01:00
Vincent Povirk 39dc81cc80 gdiplus: Implement GdipSetImagePalette. 2009-12-14 12:04:03 +01:00
Vincent Povirk 8b154a590e gdiplus: Fix cleanup after errors in GdipCloneImage. 2009-12-07 14:18:28 +01:00
Vincent Povirk bf04d3fa69 gdiplus: Implement GdipCloneBitmapArea. 2009-12-07 14:18:28 +01:00
Kirill K. Smirnov 125c5645cb gdiplus: Avoid deleting non-existent object. 2009-10-26 11:19:32 +01:00
Vincent Povirk cab50432f6 gdiplus: Enable encoding of PNG images. 2009-10-09 12:00:23 +02:00
Vincent Povirk 809f721aba gdiplus: Implement GdipBitmapSetPixel. 2009-09-24 13:26:49 +02:00
Vincent Povirk 41140a950b gdiplus: Implement GdipBitmapGetPixel. 2009-09-24 13:26:35 +02:00
Marcus Meissner e70e1249c3 gdiplus: do not memcpy over NULL ptrs (Coverity). 2009-09-22 16:15:48 +02:00
Vincent Povirk 0595fc5e03 gdiplus: Implement GdipGetImageRawFormat. 2009-09-15 17:34:12 -05:00
Vincent Povirk 0313f88794 gdiplus: Disable alpha channel support for BMP images. 2009-09-08 12:13:01 +02:00
Vincent Povirk 91e0ee260b gdiplus: Use WIC to decode PNG files. 2009-09-08 12:12:54 +02:00
Vincent Povirk 947e39dbc7 gdiplus: Use WIC to decode BMP files. 2009-09-08 12:12:45 +02:00
Vincent Povirk 6c2d85ca84 gdiplus: Use WIC to decode GIF files. 2009-09-02 10:25:02 +02:00
Vincent Povirk faad683e47 gdiplus: Use WIC to decode JPEG files. 2009-09-02 10:24:53 +02:00
Vincent Povirk e4a3ad81be gdiplus: Use WIC to encode images. 2009-09-02 10:24:47 +02:00
Vincent Povirk 9d149e606b gdiplus: Use WIC to decode ICO files. 2009-09-01 12:43:48 +02:00
Vincent Povirk cb3ee716a2 gdiplus: Reimplement GdipCreateBitmapFromHICON based on RGBA bitmaps. 2009-08-29 16:48:56 +02:00
Vincent Povirk 7fdc0208e8 gdiplus: Return the real image bits from LockBits when possible. 2009-08-29 16:48:55 +02:00
Vincent Povirk 436b3be651 gdiplus: Create DIBs instead of IPictures in CreateBitmapFromScan0. 2009-08-29 16:48:55 +02:00
Vincent Povirk d87adf2a60 gdiplus: Don't use IPicture to manage the HDC associated with a GpBitmap. 2009-08-29 16:48:55 +02:00
Vincent Povirk e48524ceb6 gdiplus: Add and use an HBITMAP field in GpBitmap objects. 2009-08-29 16:48:55 +02:00
Vincent Povirk b99abe2e91 gdiplus: Use the decoder list to decide how to load image files. 2009-08-29 16:48:55 +02:00
Vincent Povirk 2f0b4bf36b gdiplus: Add PNG to the decoders list. 2009-08-29 16:48:54 +02:00
Vincent Povirk 28e345882c gdiplus: Implement GdipCreateHBITMAPFromBitmap. 2009-08-28 11:54:50 +02:00
Vincent Povirk 7246a487d9 gdiplus: Remove an ipicture reference in GdipCreateBitmapFromStream. 2009-08-21 11:28:38 +02:00
Vincent Povirk 69ba1415e3 gdiplus: Add codecs for the image formats we can currently decode. 2009-08-21 11:17:20 +02:00
Vincent Povirk b27c3c1983 gdiplus: Only attempt to encode if the Encoder flag is set. 2009-08-21 11:16:58 +02:00
Vincent Povirk 40df7dbc07 gdiplus: Implement GdipGetImageDecoders[Size]. 2009-08-21 11:16:50 +02:00
Vincent Povirk 96023267c8 gdiplus: Store the codec information and functions in a single structure. 2009-08-21 11:16:38 +02:00
Vincent Povirk d76d00ea7e gdiplus: Remove an unnecessary picture reference in GdipSaveImageToFile. 2009-08-11 17:29:58 +02:00
Luke Benstead ea96cd3a52 gdiplus: Implement stub for GdipGetImagePalette. 2009-08-03 17:35:52 +02:00
Alexandre Julliard 4d31a25f50 gdiplus: Don't return garbage from the GdipCreateHBITMAPFromBitmap stub. 2009-07-01 12:14:40 +02:00
Andrew Eikum f01bfea62e gdiplus: Stub for GdipBitmapCreateApplyEffect. 2009-06-05 15:19:56 +02:00
Andrew Eikum ad2341253c gdiplus: Stub for GdipBitmapApplyEffect. 2009-06-05 15:19:56 +02:00
Andrew Eikum 46de8c0eb4 gdiplus: Stub for GdipEmfToWmfBits. 2009-06-04 12:38:33 +02:00
Andrew Eikum 84a434fd25 gdiplus: Stub for GdipDeleteEffect. 2009-06-03 11:53:09 +02:00
Andrew Eikum 57134fc890 gdiplus: Stub for GdipCloneBitmapArea. 2009-06-02 11:57:22 +02:00
Vincent Povirk 8219db2d6d gdiplus: Stub GdipCreateHICONFromBitmap. 2009-05-28 12:42:17 +02:00
Stefan Leichter cef1598390 gdiplus: Add stub for GdipImageRotateFlip. 2009-05-08 13:03:21 +02:00
Stefan Leichter a91a97d8ef gdiplus: Add stub for GdipGetImageThumbnail. 2009-05-06 12:06:43 +02:00
Massimo Del Fedele a3221e7f23 gdiplus: Add stub for GdipBitmapSetPixel. 2009-04-28 13:10:01 +02:00
Andrew Nguyen f82a086f56 gdiplus: Stub GdipBitmapSetResolution. 2009-04-20 17:20:12 +02:00
Vincent Povirk efcd0bbffa gdiplus: Stub GdipCloneBitmapAreaI. 2009-03-09 12:04:28 +01:00
Vincent Povirk 3db77ce50b gdiplus: Return a NULL bitmap when GdipCreateBitmapFromScan0 fails. 2009-03-05 16:16:25 +01:00
Vincent Povirk f365ef46f0 gdiplus: Fix GdipCreateBitmapFromHBITMAP flipping images vertically.
GdipCreateBitmapFromHBITMAP currently assumes that all bitmaps are
top-down, even though a positive height (which it also assumes)
signals a bottom-up DIB. The net result is that
GdipCreateBitmapFromHBITMAP flips images vertically.
2009-02-18 12:18:08 +01:00
Vincent Povirk 65750fabbb gdiplus: Handle negative stride in GdipCreateBitmapFromScan0. 2009-02-18 12:17:49 +01:00
Nikolay Sivov 5bc54ed97e gdiplus: Implemented GdipCreateBitmapFromHICON (with tests). 2009-02-03 12:48:07 +01:00
Andrey Turkin 1138c28eeb gdiplus: GdipLoadImageFromStream should use well-known pixel format constants when possible. 2009-01-15 12:42:43 +01:00
Michael Stefaniuc b53877d92e gdiplus: Remove superfluous pointer casts. 2009-01-14 13:51:00 +01:00
Michael Stefaniuc 50ff549420 gdiplus: Remove some superfluous casts. 2008-12-05 12:36:41 +01:00
Michael Stefaniuc 4386caa13b gdiplus: Reduce the number of casts by using the proper type for variables. 2008-12-05 12:36:37 +01:00
Nikolay Sivov 348c115af1 gdiplus: Stub for GdipGetImagePaletteSize. 2008-12-02 14:12:32 +01:00
Vincent Povirk f3cad17a9b gdiplus: Implement CachedBitmap based on Image. 2008-11-24 14:36:50 +01:00
Hans Leidekker 8b15fa4b2a gdiplus: Improve GdipGetImageRawFormat stub. 2008-11-24 14:25:10 +01:00
Hans Leidekker 6122c77b9d gdiplus: Add stub implementations of GdipCreateHalftonePalette and GdipImageForceValidation. 2008-11-24 14:25:10 +01:00
Nikolay Sivov 1cca99dc23 gdiplus: Added CachedBitmap calls. 2008-11-04 11:25:40 +01:00
Kirill K. Smirnov 176e4ba405 gdiplus: Whole picture object should be cloned in GdipCloneImage(), not just parent class 'image'. 2008-10-21 11:50:33 +02:00
Kirill K. Smirnov e0325b098f gdiplus: IPicture_SaveAsFile updates seek pointer, so put it back. 2008-10-17 11:48:04 +02:00
Aric Stewart c4e859a678 gdiplus: Avoid dereferencing a potential NULL (Coverity 589). 2008-10-17 11:43:23 +02:00
Alistair Leslie-Hughes 4b6cc6e3fd gdiplus: Stub GdipRecordMetafileFileName and GdipRecordMetafileFileNameI. 2008-10-06 13:49:47 +02:00
Marcus Meissner e4198d473c gdiplus: Also handle 32bpp bitmaps. 2008-10-06 13:08:58 +02:00
Lei Zhang 83d92f4195 gdiplus: Allocate enough space for BITMAPINFO in GdipLoadImageFromStream. 2008-09-30 10:15:42 -05:00
Lei Zhang 778ea2360e gdiplus: Allocate enough space for BITMAPINFO in GdipBitmapUnlockBits. 2008-09-30 10:15:37 -05:00
Lei Zhang 2309a9e4ab gdiplus: Allocate enough space for BITMAPINFO in GdipBitmapLockBits. 2008-09-30 10:15:31 -05:00
John Klehm 294c160c36 gdiplus: Stub implementation of GdipGetImageDecoders and GdipGetImageDecodersSize. 2008-09-15 13:14:13 +02:00
Nikolay Sivov d7794170e7 gdiplus: Some TRACE(..) for Image calls. 2008-09-11 12:32:14 +02:00
Nikolay Sivov c2de38ea47 gdiplus: Added missed stubs for Image metadata access. 2008-09-08 14:12:31 +02:00
Nikolay Sivov d923d78e95 gdiplus: Partially implemented GdipTestControl. 2008-09-08 14:09:36 +02:00
Nikolay Sivov b6c52ce996 gdiplus: Implemented GdipCloneImage. 2008-09-05 13:01:02 +02:00
Francois Gouget eb16f43bdf Add some API documentation stubs to make winapi_check happy. 2008-07-28 11:34:45 +02:00
Nikolay Sivov d8a25fc26c gdiplus: Implemented GdipCreateBitmapFromResource. 2008-07-17 10:53:31 +02:00
Huw Davies b2ebf709ff gdiplus: Partial implementation of GdipCreateBitmapFromGdiDib. 2008-07-10 18:10:51 +02:00
Francois Gouget f7c5736340 gdiplus: Add/fix the trailing '\n' to Wine traces. 2008-07-10 13:40:26 +02:00
Adam Petaccia af29f96939 gdiplus: Stub GdipCloneImage. 2008-07-02 12:21:21 +02:00
Petr Dlouhý 4513fb3818 gdiplus: Stub implementation of GdipImageGetFrameDimensionsCount + test. 2008-06-21 11:36:24 +02:00
Nikolay Sivov 36a7f31752 gdiplus: GdipBitmapLockBits should allow a NULL rect argument. 2008-05-21 20:17:53 +02:00
Nikolay Sivov 888262ede7 gdiplus: Added GdipLoadImageFromFileICM (no icm yet). 2008-05-12 14:00:10 +02:00
Nikolay Sivov 03b6c5e85f gdiplus: GdipGetImageFlags simple stub with test. 2008-05-12 13:59:56 +02:00
Dan Kegel 8c8262510d gdiplus: GdipLoadImageFromStream: initialize variable. 2008-04-23 14:32:59 +02:00
Lei Zhang 20a8cf6417 gdiplus: Add a stub for GdipSetEffectParameters. 2008-04-10 10:31:34 +02:00
Michael Stefaniuc 51c9d050cf gdiplus: Remove break after return (Smatch). 2008-03-25 11:44:54 +01:00
Sean Huckins 3266420a1e gdiplus: Implementation of GdipCreateBitmapFromHBITMAP. 2008-03-24 12:11:58 +01:00
Nathan Beckmann 2824aa2d33 gdiplus: Fix test crash in GdipSaveImageToStream.
Correctly initialized parameters to GetDIBits (based on
GdipLockBitmapBits).
2008-03-17 15:09:53 +01:00
Nathan Beckmann 75841d8323 gdiplus: Implement BMP encoding.
Implement the encoding function for GDI+ images so that
GdipSaveImageToStream can encode images as BMP files.
2008-03-10 20:22:43 +01:00
Nathan Beckmann 9475e3f53b gdiplus: Implement GdipSaveImageToStream using encoders.
Add the correct framework for a fully-functional implementation of
image encoding (not a hack like before). Currently, only a stub for
BMP encoding is supported. New tests added as well.
2008-03-10 20:22:27 +01:00
Nathan Beckmann 7900947ce3 gdiplus: Implement GdipSaveImageToFile via GdipSaveImageToStream.
Still need to implement saving the image based on the encoder
parameter.
Basic tests included.
2008-03-10 20:21:14 +01:00
Nathan Beckmann f4b4d03a19 gdiplus: Remove unnecessary IStream_AddRef from GdipLoadImageFromFile. 2008-03-10 20:20:50 +01:00
Nathan Beckmann e3f8f30a21 gdiplus: Return an error for consecutive GdipLockBitmapBit calls. 2008-03-10 12:09:50 +01:00
Nathan Beckmann eabc62db00 gdiplus: Update bitmap state in GdipUnlockBitmapBits. 2008-03-10 12:09:40 +01:00
Nathan Beckmann 08d49d3e33 gdiplus: Fix memory leak in GdipLockBitmapBits. 2008-03-10 12:09:32 +01:00
Nathan Beckmann 366854a7cc gdiplus: Implement GdipGetImageEncoders. 2008-03-07 11:29:05 +01:00
Ethan Chen e0552c1bc6 gdiplus: Implemented GdipCreateBitmapFromFileICM. 2008-03-06 17:38:54 +01:00
Nathan Beckmann 66067423d1 gdiplus: Fix errors in image dimensions. 2008-03-06 13:19:29 +01:00
Nathan Beckmann 484abd472e gdiplus: Implement GdipLoadImageFromFile. 2008-03-03 12:20:29 +01:00
Nathan Beckmann f49c7bb450 gdiplus: Fix IStream_Release in GdipCreateBitmapFromFile. 2008-03-03 12:19:59 +01:00