Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d104741a
Commit
d104741a
authored
Jul 17, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jul 17, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Add support for converting RGB formats to 1bpp indexed.
parent
2ed1aaa9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
4 deletions
+22
-4
image.c
dlls/gdiplus/image.c
+22
-0
image.c
dlls/gdiplus/tests/image.c
+0
-4
No files found.
dlls/gdiplus/image.c
View file @
d104741a
...
...
@@ -637,6 +637,8 @@ GpStatus convert_pixels(INT width, INT height,
case
PixelFormat16bppGrayScale
:
switch
(
dst_format
)
{
case
PixelFormat1bppIndexed
:
convert_rgb_to_indexed
(
getpixel_16bppGrayScale
,
setpixel_1bppIndexed
);
case
PixelFormat8bppIndexed
:
convert_rgb_to_indexed
(
getpixel_16bppGrayScale
,
setpixel_8bppIndexed
);
case
PixelFormat16bppRGB555
:
...
...
@@ -664,6 +666,8 @@ GpStatus convert_pixels(INT width, INT height,
case
PixelFormat16bppRGB555
:
switch
(
dst_format
)
{
case
PixelFormat1bppIndexed
:
convert_rgb_to_indexed
(
getpixel_16bppRGB555
,
setpixel_1bppIndexed
);
case
PixelFormat8bppIndexed
:
convert_rgb_to_indexed
(
getpixel_16bppRGB555
,
setpixel_8bppIndexed
);
case
PixelFormat16bppGrayScale
:
...
...
@@ -691,6 +695,8 @@ GpStatus convert_pixels(INT width, INT height,
case
PixelFormat16bppRGB565
:
switch
(
dst_format
)
{
case
PixelFormat1bppIndexed
:
convert_rgb_to_indexed
(
getpixel_16bppRGB565
,
setpixel_1bppIndexed
);
case
PixelFormat8bppIndexed
:
convert_rgb_to_indexed
(
getpixel_16bppRGB565
,
setpixel_8bppIndexed
);
case
PixelFormat16bppGrayScale
:
...
...
@@ -718,6 +724,8 @@ GpStatus convert_pixels(INT width, INT height,
case
PixelFormat16bppARGB1555
:
switch
(
dst_format
)
{
case
PixelFormat1bppIndexed
:
convert_rgb_to_indexed
(
getpixel_16bppARGB1555
,
setpixel_1bppIndexed
);
case
PixelFormat8bppIndexed
:
convert_rgb_to_indexed
(
getpixel_16bppARGB1555
,
setpixel_8bppIndexed
);
case
PixelFormat16bppGrayScale
:
...
...
@@ -745,6 +753,8 @@ GpStatus convert_pixels(INT width, INT height,
case
PixelFormat24bppRGB
:
switch
(
dst_format
)
{
case
PixelFormat1bppIndexed
:
convert_rgb_to_indexed
(
getpixel_24bppRGB
,
setpixel_1bppIndexed
);
case
PixelFormat8bppIndexed
:
convert_rgb_to_indexed
(
getpixel_24bppRGB
,
setpixel_8bppIndexed
);
case
PixelFormat16bppGrayScale
:
...
...
@@ -772,6 +782,8 @@ GpStatus convert_pixels(INT width, INT height,
case
PixelFormat32bppRGB
:
switch
(
dst_format
)
{
case
PixelFormat1bppIndexed
:
convert_rgb_to_indexed
(
getpixel_32bppRGB
,
setpixel_1bppIndexed
);
case
PixelFormat8bppIndexed
:
convert_rgb_to_indexed
(
getpixel_32bppRGB
,
setpixel_8bppIndexed
);
case
PixelFormat16bppGrayScale
:
...
...
@@ -799,6 +811,8 @@ GpStatus convert_pixels(INT width, INT height,
case
PixelFormat32bppARGB
:
switch
(
dst_format
)
{
case
PixelFormat1bppIndexed
:
convert_rgb_to_indexed
(
getpixel_32bppARGB
,
setpixel_1bppIndexed
);
case
PixelFormat8bppIndexed
:
convert_rgb_to_indexed
(
getpixel_32bppARGB
,
setpixel_8bppIndexed
);
case
PixelFormat16bppGrayScale
:
...
...
@@ -825,6 +839,8 @@ GpStatus convert_pixels(INT width, INT height,
case
PixelFormat32bppPARGB
:
switch
(
dst_format
)
{
case
PixelFormat1bppIndexed
:
convert_rgb_to_indexed
(
getpixel_32bppPARGB
,
setpixel_1bppIndexed
);
case
PixelFormat8bppIndexed
:
convert_rgb_to_indexed
(
getpixel_32bppPARGB
,
setpixel_8bppIndexed
);
case
PixelFormat16bppGrayScale
:
...
...
@@ -852,6 +868,8 @@ GpStatus convert_pixels(INT width, INT height,
case
PixelFormat48bppRGB
:
switch
(
dst_format
)
{
case
PixelFormat1bppIndexed
:
convert_rgb_to_indexed
(
getpixel_48bppRGB
,
setpixel_1bppIndexed
);
case
PixelFormat8bppIndexed
:
convert_rgb_to_indexed
(
getpixel_48bppRGB
,
setpixel_8bppIndexed
);
case
PixelFormat16bppGrayScale
:
...
...
@@ -879,6 +897,8 @@ GpStatus convert_pixels(INT width, INT height,
case
PixelFormat64bppARGB
:
switch
(
dst_format
)
{
case
PixelFormat1bppIndexed
:
convert_rgb_to_indexed
(
getpixel_64bppARGB
,
setpixel_1bppIndexed
);
case
PixelFormat8bppIndexed
:
convert_rgb_to_indexed
(
getpixel_64bppARGB
,
setpixel_8bppIndexed
);
case
PixelFormat16bppGrayScale
:
...
...
@@ -906,6 +926,8 @@ GpStatus convert_pixels(INT width, INT height,
case
PixelFormat64bppPARGB
:
switch
(
dst_format
)
{
case
PixelFormat1bppIndexed
:
convert_rgb_to_indexed
(
getpixel_64bppPARGB
,
setpixel_1bppIndexed
);
case
PixelFormat8bppIndexed
:
convert_rgb_to_indexed
(
getpixel_64bppPARGB
,
setpixel_8bppIndexed
);
case
PixelFormat16bppGrayScale
:
...
...
dlls/gdiplus/tests/image.c
View file @
d104741a
...
...
@@ -3404,7 +3404,6 @@ static void test_bitmapbits(void)
0x77
,
0x77
,
0x77
,
0x77
,
0x77
,
0x77
,
0x77
,
0x77
,
0x77
,
0x77
,
0x77
,
0x77
,
0x77
,
0x77
,
0x77
,
0x77
};
#if 0 /* FIXME: these tests crash gdiplus in Wine */
static
const
BYTE
pixels_1_77
[
64
]
=
{
0xaa
,
0x77
,
0x77
,
0x77
,
0x77
,
0x77
,
0x77
,
0x77
,
...
...
@@ -3417,7 +3416,6 @@ static void test_bitmapbits(void)
0x77
,
0x77
,
0x77
,
0x77
,
0x77
,
0x77
,
0x77
,
0x77
};
static
const
BYTE
pixels_1
[
8
]
=
{
0xaa
,
0
,
0
,
0
,
0xaa
,
0
,
0
,
0
};
#endif
static
const
struct
test_data
{
PixelFormat
format
;
...
...
@@ -3446,7 +3444,6 @@ static void test_bitmapbits(void)
{
PixelFormat8bppIndexed
,
8
,
ImageLockModeRead
|
ImageLockModeUserInputBuf
,
32
,
64
,
pixels_8_77
,
pixels_24
},
{
PixelFormat8bppIndexed
,
8
,
ImageLockModeWrite
|
ImageLockModeUserInputBuf
,
32
,
64
,
pixels_77
,
pixels_00
},
{
PixelFormat8bppIndexed
,
8
,
ImageLockModeUserInputBuf
,
32
,
64
,
pixels_77
,
pixels_24
},
#if 0 /* FIXME: these tests crash gdiplus in Wine */
/* 15 */
{
PixelFormat1bppIndexed
,
1
,
0
,
4
,
8
,
pixels_1
,
pixels_24
},
{
PixelFormat1bppIndexed
,
1
,
ImageLockModeRead
,
4
,
8
,
pixels_1
,
pixels_24
},
...
...
@@ -3455,7 +3452,6 @@ static void test_bitmapbits(void)
{
PixelFormat1bppIndexed
,
1
,
ImageLockModeRead
|
ImageLockModeUserInputBuf
,
32
,
64
,
pixels_1_77
,
pixels_24
},
{
PixelFormat1bppIndexed
,
1
,
ImageLockModeWrite
|
ImageLockModeUserInputBuf
,
32
,
64
,
pixels_77
,
pixels_00
},
{
PixelFormat1bppIndexed
,
1
,
ImageLockModeUserInputBuf
,
32
,
64
,
pixels_77
,
pixels_24
},
#endif
};
BYTE
buf
[
64
];
GpStatus
status
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment