Skip to content

Handle fully transparent average colors - #967

Open
offyotto wants to merge 1 commit into
jordanbaird:mainfrom
offyotto:handle-transparent-average-color
Open

Handle fully transparent average colors#967
offyotto wants to merge 1 commit into
jordanbaird:mainfrom
offyotto:handle-transparent-average-color

Conversation

@offyotto

Copy link
Copy Markdown

An image with no pixels at or above the alpha threshold leaves the included pixel count at zero. averageColor then divides by zero and returns a color containing NaN components.

Return nil when no pixels qualify. The existing menu bar and Ice Bar callers already handle a missing average color.

Test: xcodebuild -project Ice.xcodeproj -scheme Ice -configuration Debug -derivedDataPath /tmp/IceDerivedData CODE_SIGNING_ALLOWED=NO build (BUILD SUCCEEDED)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant