Partial gamma correction

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
cjanice
Posts: 1
Joined: 2018-09-20T00:55:55-07:00
Authentication code: 1152

Partial gamma correction

Post by cjanice » 2018-09-20T01:04:59-07:00

I have a RGB image and I would like to select the first n% of red, green and blue for gamma correction while leaving the other pixels unchanged.

How can I do it in ImageMagick with version 6.7.8-9 on Linux?

snibgo
Posts: 10714
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Partial gamma correction

Post by snibgo » 2018-09-20T03:35:50-07:00

I don't understand the question.

A required operation often breaks down into:
- what changes do I want?
- where do I want those changes?

A solution is to clone the input, apply the changes to that clone, then composite the clone over the original using a mask that is white where we want the changes and black where we don't.

For your problem, the mask might come from "select the first n% of red, green and blue" but I don't know what that means.
snibgo's IM pages: im.snibgo.com

Post Reply