Skip to content

add temperature filter for warm/cool color adjustment#63

Merged
swperb merged 4 commits into
swperb:mainfrom
priyamkarn:feat/temperature-filter
Jun 16, 2026
Merged

add temperature filter for warm/cool color adjustment#63
swperb merged 4 commits into
swperb:mainfrom
priyamkarn:feat/temperature-filter

Conversation

@priyamkarn

Copy link
Copy Markdown
Contributor

Summary

Adds a new temperature filter (alias: temp) for warming or cooling images.

Implementation

  • Added f_temperature
  • Positive values warm the image by increasing red and decreasing blue
  • Negative values cool the image by decreasing red and increasing blue
  • Added temperature and temp filter registrations

Usage

imgcli -vf "temperature=0.5"
imgcli -vf "temperature=-0.5"

Testing

make
./imgcli -filters
./imgcli -y -i testsrc=128x128 -vf "temperature=0.5" warm.png
./imgcli -y -i testsrc=128x128 -vf "temperature=-0.5" cool.png

Closes #

@priyamkarn

Copy link
Copy Markdown
Contributor Author

Hi @swperb! This PR is ready for review. Could you approve the workflow run when you get a chance?

@priyamkarn priyamkarn left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have made all the required changes.

swperb and others added 2 commits June 15, 2026 19:18
CONTRIBUTING.md step 5 asks for docs on user-facing filter changes. The
good-first-issue didn't mention the README, so adding the line on merge rather
than asking a first-time contributor to round-trip.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@swperb

swperb commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Thanks @priyamkarn — really clean first contribution! 🎉

I verified the math: warm (+) raises red and lowers blue, cool (−) does the reverse, green and alpha stay untouched, and extreme values clamp safely via clampb. I added the one-line README filter-list entry on top, since the original issue didn't call out the docs step — that was my oversight in the issue, not yours.

Merging now. Thanks for picking this up, and hope to see you back for another!

@swperb swperb merged commit c359266 into swperb:main Jun 16, 2026
11 checks passed
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.

2 participants