Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
90c2949b
Commit
90c2949b
authored
Aug 09, 2023
by
Bartosz Kosiorek
Committed by
Alexandre Julliard
Aug 10, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Add support support for 1, 4 and 8 bpp indexed pixel format conversion.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=20694
parent
f86c4969
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
image.c
dlls/gdiplus/image.c
+27
-0
No files found.
dlls/gdiplus/image.c
View file @
90c2949b
...
...
@@ -617,6 +617,19 @@ GpStatus convert_pixels(INT width, INT height,
return Ok; \
} while (0);
#define convert_indexed_to_indexed(getpixel_function, setpixel_function) do { \
for (y=0; y<height; y++) \
for (x=0; x<width; x++) { \
BYTE index; \
ARGB argb; \
BYTE *color = (BYTE *)&argb; \
getpixel_function(&index, src_bits+src_stride*y, x); \
argb = (src_palette && index < src_palette->Count) ? src_palette->Entries[index] : 0; \
setpixel_function(color[2], color[1], color[0], color[3], dst_bits+dst_stride*y, x, dst_palette); \
} \
return Ok; \
} while (0);
#define convert_rgb_to_rgb(getpixel_function, setpixel_function) do { \
for (y=0; y<height; y++) \
for (x=0; x<width; x++) { \
...
...
@@ -642,6 +655,10 @@ GpStatus convert_pixels(INT width, INT height,
case
PixelFormat1bppIndexed
:
switch
(
dst_format
)
{
case
PixelFormat4bppIndexed
:
convert_indexed_to_indexed
(
getpixel_1bppIndexed
,
setpixel_4bppIndexed
);
case
PixelFormat8bppIndexed
:
convert_indexed_to_indexed
(
getpixel_1bppIndexed
,
setpixel_8bppIndexed
);
case
PixelFormat16bppGrayScale
:
convert_indexed_to_rgb
(
getpixel_1bppIndexed
,
setpixel_16bppGrayScale
);
case
PixelFormat16bppRGB555
:
...
...
@@ -669,6 +686,10 @@ GpStatus convert_pixels(INT width, INT height,
case
PixelFormat4bppIndexed
:
switch
(
dst_format
)
{
case
PixelFormat1bppIndexed
:
convert_indexed_to_indexed
(
getpixel_4bppIndexed
,
setpixel_1bppIndexed
);
case
PixelFormat8bppIndexed
:
convert_indexed_to_indexed
(
getpixel_4bppIndexed
,
setpixel_8bppIndexed
);
case
PixelFormat16bppGrayScale
:
convert_indexed_to_rgb
(
getpixel_4bppIndexed
,
setpixel_16bppGrayScale
);
case
PixelFormat16bppRGB555
:
...
...
@@ -696,6 +717,10 @@ GpStatus convert_pixels(INT width, INT height,
case
PixelFormat8bppIndexed
:
switch
(
dst_format
)
{
case
PixelFormat1bppIndexed
:
convert_indexed_to_indexed
(
getpixel_8bppIndexed
,
setpixel_1bppIndexed
);
case
PixelFormat4bppIndexed
:
convert_indexed_to_indexed
(
getpixel_8bppIndexed
,
setpixel_4bppIndexed
);
case
PixelFormat16bppGrayScale
:
convert_indexed_to_rgb
(
getpixel_8bppIndexed
,
setpixel_16bppGrayScale
);
case
PixelFormat16bppRGB555
:
...
...
@@ -1067,7 +1092,9 @@ GpStatus convert_pixels(INT width, INT height,
}
#undef convert_indexed_to_rgb
#undef convert_indexed_to_indexed
#undef convert_rgb_to_rgb
#undef convert_rgb_to_indexed
return
NotImplemented
;
}
...
...
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