We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4596 - [Patch] Clean up WIC backend to work with C, MinGW
Summary: [Patch] Clean up WIC backend to work with C, MinGW
Status: RESOLVED FIXED
Alias: None
Product: SDL_image
Classification: Unclassified
Component: misc (show other bugs)
Version: 2.0.3
Hardware: All Windows (All)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-12 14:54 UTC by Ethan Lee
Modified: 2019-04-17 03:16 UTC (History)
0 users

See Also:


Attachments
Patch to clean up IMG_WIC.c (4.86 KB, patch)
2019-04-12 14:54 UTC, Ethan Lee
Details | Diff
Patch to clean up IMG_WIC.c (4.86 KB, patch)
2019-04-12 20:31 UTC, Ethan Lee
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ethan Lee 2019-04-12 14:54:10 UTC
Created attachment 3746 [details]
Patch to clean up IMG_WIC.c

The current IMG_WIC implementation uses C++ and IWIC2, which wasn't as compatible as C and IWIC, so I cleaned up the file and made it work with MinGW. It should be functionally the same with the following exceptions:

1. Changed the channel mask to match the other backends' output data (maybe IWIC2 swapped R and B?)
2. Check for WIC_Init when calling WIC_LoadImage, similar to other backends
Comment 1 Ethan Lee 2019-04-12 20:31:50 UTC
Created attachment 3747 [details]
Patch to clean up IMG_WIC.c

Quick update to make the WIC_Init check more correct.
Comment 2 Sam Lantinga 2019-04-17 03:16:59 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL_image/rev/61f1bf992955