ReactOS 0.4.16-dev-319-g6cf4263
|
#include <stdarg.h>
#include <assert.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "objbase.h"
#include "olectl.h"
#include "ole2.h"
#include "initguid.h"
#include "wincodec.h"
#include "gdiplus.h"
#include "gdiplus_private.h"
#include "wine/debug.h"
Go to the source code of this file.
Classes | |
struct | image_format_dimension |
struct | image_codec |
Macros | |
#define | NONAMELESSUNION |
#define | COBJMACROS |
#define | PIXELFORMATBPP(x) ((x) ? ((x) >> 8) & 255 : 24) |
#define | WMF_PLACEABLE_KEY 0x9ac6cdd7 |
#define | convert_indexed_to_rgb(getpixel_function, setpixel_function) |
#define | convert_rgb_to_rgb(getpixel_function, setpixel_function) |
#define | convert_rgb_to_indexed(getpixel_function, setpixel_function) |
#define | PropertyTagTypeSByte 6 |
#define | PropertyTagTypeSShort 8 |
#define | PropertyTagTypeFloat 11 |
#define | PropertyTagTypeDouble 12 |
Typedefs | |
typedef void(* | metadata_reader_func) (GpBitmap *bitmap, IWICBitmapDecoder *decoder, UINT frame) |
typedef GpStatus(* | encode_image_func) (GpImage *image, IStream *stream, GDIPCONST EncoderParameters *params) |
typedef GpStatus(* | decode_image_func) (IStream *stream, GpImage **image) |
typedef GpStatus(* | select_image_func) (GpImage *image, UINT active_frame) |
typedef struct image_codec | image_codec |
Enumerations | |
enum | ImageFormat { BMP , JPEG , GIF , TIFF , EMF , WMF , PNG , ICO , NUM_CODECS } |
Variables | |
struct { | |
const WICPixelFormatGUID * wic_format | |
PixelFormat gdip_format | |
WICBitmapPaletteType palette_type | |
} | pixel_formats [] |
static const struct image_format_dimension | image_format_dimensions [] |
static const struct image_codec | codecs [NUM_CODECS] |
static const WCHAR | bmp_codecname [] = {'B', 'u', 'i','l', 't', '-','i', 'n', ' ', 'B', 'M', 'P', 0} |
static const WCHAR | bmp_extension [] = {'*','.','B', 'M', 'P',';', '*','.', 'D','I', 'B',';', '*','.', 'R', 'L', 'E',0} |
static const WCHAR | bmp_mimetype [] = {'i', 'm', 'a','g', 'e', '/', 'b', 'm', 'p', 0} |
static const WCHAR | bmp_format [] = {'B', 'M', 'P', 0} |
static const BYTE | bmp_sig_pattern [] = { 0x42, 0x4D } |
static const BYTE | bmp_sig_mask [] = { 0xFF, 0xFF } |
static const WCHAR | jpeg_codecname [] = {'B', 'u', 'i','l', 't', '-','i', 'n', ' ', 'J','P','E','G', 0} |
static const WCHAR | jpeg_extension [] = {'*','.','J','P','G',';', '*','.','J','P','E','G',';', '*','.','J','P','E',';', '*','.','J','F','I','F',0} |
static const WCHAR | jpeg_mimetype [] = {'i','m','a','g','e','/','j','p','e','g', 0} |
static const WCHAR | jpeg_format [] = {'J','P','E','G',0} |
static const BYTE | jpeg_sig_pattern [] = { 0xFF, 0xD8 } |
static const BYTE | jpeg_sig_mask [] = { 0xFF, 0xFF } |
static const WCHAR | gif_codecname [] = {'B', 'u', 'i','l', 't', '-','i', 'n', ' ', 'G','I','F', 0} |
static const WCHAR | gif_extension [] = {'*','.','G','I','F',0} |
static const WCHAR | gif_mimetype [] = {'i','m','a','g','e','/','g','i','f', 0} |
static const WCHAR | gif_format [] = {'G','I','F',0} |
static const BYTE | gif_sig_pattern [12] = "GIF87aGIF89a" |
static const BYTE | gif_sig_mask [] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF } |
static const WCHAR | tiff_codecname [] = {'B', 'u', 'i','l', 't', '-','i', 'n', ' ', 'T','I','F','F', 0} |
static const WCHAR | tiff_extension [] = {'*','.','T','I','F','F',';','*','.','T','I','F',0} |
static const WCHAR | tiff_mimetype [] = {'i','m','a','g','e','/','t','i','f','f', 0} |
static const WCHAR | tiff_format [] = {'T','I','F','F',0} |
static const BYTE | tiff_sig_pattern [] = {0x49,0x49,42,0,0x4d,0x4d,0,42} |
static const BYTE | tiff_sig_mask [] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF } |
static const WCHAR | emf_codecname [] = {'B', 'u', 'i','l', 't', '-','i', 'n', ' ', 'E','M','F', 0} |
static const WCHAR | emf_extension [] = {'*','.','E','M','F',0} |
static const WCHAR | emf_mimetype [] = {'i','m','a','g','e','/','x','-','e','m','f', 0} |
static const WCHAR | emf_format [] = {'E','M','F',0} |
static const BYTE | emf_sig_pattern [] = { 0x01, 0x00, 0x00, 0x00 } |
static const BYTE | emf_sig_mask [] = { 0xFF, 0xFF, 0xFF, 0xFF } |
static const WCHAR | wmf_codecname [] = {'B', 'u', 'i','l', 't', '-','i', 'n', ' ', 'W','M','F', 0} |
static const WCHAR | wmf_extension [] = {'*','.','W','M','F',0} |
static const WCHAR | wmf_mimetype [] = {'i','m','a','g','e','/','x','-','w','m','f', 0} |
static const WCHAR | wmf_format [] = {'W','M','F',0} |
static const BYTE | wmf_sig_pattern [] = { 0xd7, 0xcd } |
static const BYTE | wmf_sig_mask [] = { 0xFF, 0xFF } |
static const WCHAR | png_codecname [] = {'B', 'u', 'i','l', 't', '-','i', 'n', ' ', 'P','N','G', 0} |
static const WCHAR | png_extension [] = {'*','.','P','N','G',0} |
static const WCHAR | png_mimetype [] = {'i','m','a','g','e','/','p','n','g', 0} |
static const WCHAR | png_format [] = {'P','N','G',0} |
static const BYTE | png_sig_pattern [] = { 137, 80, 78, 71, 13, 10, 26, 10, } |
static const BYTE | png_sig_mask [] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF } |
static const WCHAR | ico_codecname [] = {'B', 'u', 'i','l', 't', '-','i', 'n', ' ', 'I','C','O', 0} |
static const WCHAR | ico_extension [] = {'*','.','I','C','O',0} |
static const WCHAR | ico_mimetype [] = {'i','m','a','g','e','/','x','-','i','c','o','n', 0} |
static const WCHAR | ico_format [] = {'I','C','O',0} |
static const BYTE | ico_sig_pattern [] = { 0x00, 0x00, 0x01, 0x00 } |
static const BYTE | ico_sig_mask [] = { 0xFF, 0xFF, 0xFF, 0xFF } |
#define convert_indexed_to_rgb | ( | getpixel_function, | |
setpixel_function | |||
) |
#define convert_rgb_to_indexed | ( | getpixel_function, | |
setpixel_function | |||
) |
#define convert_rgb_to_rgb | ( | getpixel_function, | |
setpixel_function | |||
) |
typedef struct image_codec image_codec |
typedef void(* metadata_reader_func) (GpBitmap *bitmap, IWICBitmapDecoder *decoder, UINT frame) |
|
static |
Definition at line 3009 of file image.c.
Referenced by gif_metadata_reader(), and png_metadata_reader().
Definition at line 1467 of file image.c.
Referenced by GdipCreateHBITMAPFromBitmap().
|
static |
Definition at line 3834 of file image.c.
Referenced by select_frame_gif().
GpStatus convert_pixels | ( | INT | width, |
INT | height, | ||
INT | dst_stride, | ||
BYTE * | dst_bits, | ||
PixelFormat | dst_format, | ||
INT | src_stride, | ||
const BYTE * | src_bits, | ||
PixelFormat | src_format, | ||
ColorPalette * | palette | ||
) |
Definition at line 562 of file image.c.
Referenced by GdipBitmapLockBits(), GdipBitmapUnlockBits(), GdipCloneBitmapArea(), GdipCreateHBITMAPFromBitmap(), and GdipDrawImagePointsRect().
|
static |
Definition at line 5693 of file image.c.
Referenced by GdipInitializePalette().
|
static |
Definition at line 3419 of file image.c.
Referenced by png_metadata_reader().
|
static |
Definition at line 3632 of file image.c.
Referenced by decode_image_gif(), decode_image_png(), decode_image_wic(), and select_frame_wic().
Definition at line 3983 of file image.c.
Definition at line 4234 of file image.c.
Definition at line 4082 of file image.c.
Definition at line 4039 of file image.c.
|
static |
Definition at line 3786 of file image.c.
Referenced by decode_image_bmp(), decode_image_icon(), decode_image_jpeg(), and decode_image_tiff().
|
static |
Definition at line 4638 of file image.c.
|
static |
|
static |
GpStatus encode_image_png | ( | GpImage * | image, |
IStream * | stream, | ||
GDIPCONST EncoderParameters * | params | ||
) |
Definition at line 4650 of file image.c.
Referenced by METAFILE_CreateCompressedImageStream().
|
static |
|
static |
Definition at line 4503 of file image.c.
Referenced by encode_image_BMP(), encode_image_gif(), encode_image_jpeg(), encode_image_png(), and encode_image_tiff().
Definition at line 2126 of file image.c.
Referenced by GdipDisposeImage(), and select_frame_wic().
GpStatus WINGDIPAPI GdipBitmapApplyEffect | ( | GpBitmap * | bitmap, |
CGpEffect * | effect, | ||
RECT * | roi, | ||
BOOL | useAuxData, | ||
VOID ** | auxData, | ||
INT * | auxDataSize | ||
) |
GpStatus WINGDIPAPI GdipBitmapConvertFormat | ( | GpBitmap * | bitmap, |
PixelFormat | format, | ||
DitherType | dithertype, | ||
PaletteType | palettetype, | ||
ColorPalette * | palette, | ||
REAL | alphathreshold | ||
) |
GpStatus WINGDIPAPI GdipBitmapCreateApplyEffect | ( | GpBitmap ** | inputBitmaps, |
INT | numInputs, | ||
CGpEffect * | effect, | ||
RECT * | roi, | ||
RECT * | outputRect, | ||
GpBitmap ** | outputBitmap, | ||
BOOL | useAuxData, | ||
VOID ** | auxData, | ||
INT * | auxDataSize | ||
) |
Definition at line 145 of file image.c.
GpStatus WINGDIPAPI GdipBitmapGetHistogram | ( | GpBitmap * | bitmap, |
HistogramFormat | format, | ||
UINT | num_of_entries, | ||
UINT * | ch0, | ||
UINT * | ch1, | ||
UINT * | ch2, | ||
UINT * | ch3 | ||
) |
Definition at line 5609 of file image.c.
GpStatus WINGDIPAPI GdipBitmapGetHistogramSize | ( | HistogramFormat | format, |
UINT * | num_of_entries | ||
) |
Definition at line 288 of file image.c.
Referenced by alpha_blend_bmp_pixels(), GdipBitmapGetHistogram(), test_clear(), test_clipping(), test_colorkey(), test_colormatrix(), test_containers(), test_emfonly(), test_fillrect(), test_gamma(), test_GdipFillRectanglesOnBitmapTextureBrush(), test_GdipImageGetFrameDimensionsCount(), test_gditransform(), test_getdc(), test_getdc_scaled(), test_getsetpixel(), test_LockBits(), test_LockBits_UserBuf(), test_multiframegif(), test_pagetransform(), test_palette(), test_remaptable(), test_rotateflip(), and test_worldtransform().
GpStatus WINGDIPAPI GdipBitmapLockBits | ( | GpBitmap * | bitmap, |
GDIPCONST GpRect * | rect, | ||
UINT | flags, | ||
PixelFormat | format, | ||
BitmapData * | lockeddata | ||
) |
Definition at line 1030 of file image.c.
Referenced by brush_fill_pixels(), create_optimal_palette(), decode_frame_wic(), DibLoadImage(), encode_image_wic(), GdipCreateBitmapFromHBITMAP(), GdipCreateBitmapFromHICON(), GdipCreateHICONFromBitmap(), GdipDrawImagePointsRect(), GdipImageRotateFlip(), test_ARGB_conversion(), test_bitmapbits(), test_CloneBitmapArea(), test_createhbitmap(), test_image_format(), test_LockBits(), test_LockBits_UserBuf(), and test_pen_thickness().
Definition at line 494 of file image.c.
Referenced by alpha_blend_bmp_pixels(), test_colorkey(), test_colormatrix(), test_emfonly(), test_fillrect(), test_gamma(), test_GdipCreateBitmapFromHBITMAP(), test_GdipImageGetFrameDimensionsCount(), test_getdc(), test_getsetpixel(), test_histogram(), test_LockBits(), test_multiframegif(), test_palette(), and test_remaptable().
GpStatus WINGDIPAPI GdipBitmapSetResolution | ( | GpBitmap * | bitmap, |
REAL | xdpi, | ||
REAL | ydpi | ||
) |
Definition at line 1163 of file image.c.
Referenced by create_graphics(), test_DrawImage(), test_DrawImage_scale(), test_GdipDrawImagePointRect(), test_pen_thickness(), and test_resolution().
GpStatus WINGDIPAPI GdipBitmapUnlockBits | ( | GpBitmap * | bitmap, |
BitmapData * | lockeddata | ||
) |
Definition at line 1176 of file image.c.
Referenced by brush_fill_pixels(), create_optimal_palette(), decode_frame_wic(), DibLoadImage(), encode_image_wic(), GdipCreateBitmapFromHBITMAP(), GdipCreateBitmapFromHICON(), GdipCreateHICONFromBitmap(), GdipDrawImagePointsRect(), GdipImageRotateFlip(), test_ARGB_conversion(), test_bitmapbits(), test_CloneBitmapArea(), test_createhbitmap(), test_image_format(), test_LockBits(), test_LockBits_UserBuf(), and test_pen_thickness().
GpStatus WINGDIPAPI GdipCloneBitmapArea | ( | REAL | x, |
REAL | y, | ||
REAL | width, | ||
REAL | height, | ||
PixelFormat | format, | ||
GpBitmap * | srcBitmap, | ||
GpBitmap ** | dstBitmap | ||
) |
Definition at line 1237 of file image.c.
Referenced by GdipCloneBitmapAreaI(), and GdipCreateTextureIA().
GpStatus WINGDIPAPI GdipCloneBitmapAreaI | ( | INT | x, |
INT | y, | ||
INT | width, | ||
INT | height, | ||
PixelFormat | format, | ||
GpBitmap * | srcBitmap, | ||
GpBitmap ** | dstBitmap | ||
) |
Definition at line 1300 of file image.c.
Referenced by GdipCloneImage(), and test_CloneBitmapArea().
GpStatus WINGDIPAPI GdipCloneImage | ( | GpImage * | image, |
GpImage ** | cloneImage | ||
) |
Definition at line 1308 of file image.c.
Referenced by GdipCreateCachedBitmap(), GdipGetTextureImage(), load_image(), sync_metafile(), test_emfonly(), and test_GdipCloneImage().
GpStatus WINGDIPAPI GdipCreateBitmapFromFile | ( | GDIPCONST WCHAR * | filename, |
GpBitmap ** | bitmap | ||
) |
Definition at line 1360 of file image.c.
Referenced by DibLoadImage(), GdipCreateBitmapFromFileICM(), and test_LoadingImages().
GpStatus WINGDIPAPI GdipCreateBitmapFromFileICM | ( | GDIPCONST WCHAR * | filename, |
GpBitmap ** | bitmap | ||
) |
Definition at line 1436 of file image.c.
GpStatus WINGDIPAPI GdipCreateBitmapFromGdiDib | ( | GDIPCONST BITMAPINFO * | info, |
VOID * | bits, | ||
GpBitmap ** | bitmap | ||
) |
Definition at line 1385 of file image.c.
Referenced by test_drawimage(), test_FromGdiDib(), and test_GdipDrawImagePointsRect().
GpStatus WINGDIPAPI GdipCreateBitmapFromGraphics | ( | INT | width, |
INT | height, | ||
GpGraphics * | target, | ||
GpBitmap ** | bitmap | ||
) |
Definition at line 1542 of file image.c.
Referenced by test_bitmapfromgraphics(), test_texturewrap(), and test_transform().
GpStatus WINGDIPAPI GdipCreateBitmapFromHBITMAP | ( | HBITMAP | hbm, |
HPALETTE | hpal, | ||
GpBitmap ** | bitmap | ||
) |
Definition at line 5152 of file image.c.
Referenced by GdipCreateBitmapFromResource(), GdipCreateBitmapFromStream(), and test_GdipCreateBitmapFromHBITMAP().
GpStatus WINGDIPAPI GdipCreateBitmapFromHICON | ( | HICON | hicon, |
GpBitmap ** | bitmap | ||
) |
Definition at line 1564 of file image.c.
Referenced by test_fromhicon().
GpStatus WINGDIPAPI GdipCreateBitmapFromResource | ( | HINSTANCE | hInstance, |
GDIPCONST WCHAR * | lpBitmapName, | ||
GpBitmap ** | bitmap | ||
) |
Definition at line 1444 of file image.c.
GpStatus WINGDIPAPI GdipCreateBitmapFromScan0 | ( | INT | width, |
INT | height, | ||
INT | stride, | ||
PixelFormat | format, | ||
BYTE * | scan0, | ||
GpBitmap ** | bitmap | ||
) |
Definition at line 1760 of file image.c.