Skip to content

Conversation

@dreampiggy
Copy link
Contributor

New Pull Request Checklist

  • I have read and understood the CONTRIBUTING guide

  • I have read the Documentation

  • I have searched for a similar pull request in the project and found none

  • I have updated this branch with the latest master to avoid conflicts (via merge from master or rebase)

  • I have added the required tests to prove the fix/feature I am adding

  • I have updated the documentation (if necessary)

  • I have run the tests and they pass

  • I have run the lint and it passes (pod lib lint)

This merge request fixes / refers to the following issues: ...

Pull Request Description

In previous version, when using RGB16/RGBA10, these method may return a non-nil but not correct UIColor, which may cause more complicated issue and hard to detect.

Now, we just return nil and log the error, to let user know it's not supported

@dreampiggy dreampiggy added this to the 5.21.0 milestone Feb 21, 2025
@dreampiggy dreampiggy force-pushed the bugfix/sd_colorAtPoint_early_return branch from 67c3453 to e332544 Compare February 22, 2025 09:21
@dreampiggy dreampiggy force-pushed the bugfix/sd_colorAtPoint_early_return branch 2 times, most recently from 36ff532 to 9a312ca Compare February 22, 2025 09:33
@dreampiggy dreampiggy added the HDR High Dynamic Range image label Feb 22, 2025
@dreampiggy
Copy link
Contributor Author

In the future, we may support RGBA16 or RGBAF, but this needs more testing and I doubt how many user need this API

@dreampiggy dreampiggy force-pushed the bugfix/sd_colorAtPoint_early_return branch from 9a312ca to 207a03c Compare February 22, 2025 09:38
@dreampiggy dreampiggy merged commit e618417 into SDWebImage:master Feb 22, 2025
6 of 7 checks passed
@dreampiggy dreampiggy changed the title fix: sd_colorAtPoint should early return when pixel format is not supported fix: sd_colorAtPoint/sd_colorsWithRect should early return when pixel format is not supported Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

HDR High Dynamic Range image

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant