Selective -clamp may be needed

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
pipe
Posts: 28
Joined: 2013-04-09T08:32:37-07:00
Authentication code: 6789

Selective -clamp may be needed

Post by pipe »

When I was thinking about the problem with negative values and gamma, I realized that a similar problem may show up with other algorithms, and that it would be great to have a -clamp that only clips values below 0.0.

If -clamp had not already been used to clamp both the upper and lower range, I would have suggested that -clamp only cut everything below 0.0, and +clamp cut everything above 1.0.

I haven't thought much about this, so I'm just going to post here to see if it's been considered already, and if some more experienced users/developers have any insights. Maybe a parameter for -clamp [lower,upper], where lower or upper could somehow be left out if you only want to clamp one range?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Selective -clamp may be needed

Post by anthony »

We could have a +clamp {method}
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply