Joshua Lamusga

Channel Operations

Recommended Posts

Overview

This plugin lets you change the RGB, HSV, or alpha channel of the image. It replaces my old Saturation to Alpha plugin and a lot of other users' channel-manipulating plugins. After choosing a channel to manipulate, you can perform arithmetic operations, inversion, channel swapping, contrast and truncation. Located in the Adjustments tab.

 
D6DERaC.gifwsvLhvb.gif
 

Purpose and Application
I find this useful mainly to set the alpha of an image and colorize a grayscale image, since you can't color a grayscale image using the Hue/Saturation tool if it has 0 saturation. Truncation makes a neat 4-bit or 8-bit effect, I suppose.
 
Options
Invert: Takes the maximum value of the channel and subtracts the current value from it, then overwrites the current value with this new one.
 
Overwrite: Choose a channel, then choose a second channel to replace it. The value of the first channel is overwritten by the value of the second channel. This does not swap their values.
 
Set: Directly set the value of a channel.
 
Sharpen: Increase the contrast of the channel. This does not decrease contrast.
 
Add: Add a value to each pixel in the selected channel.
 
Subtract: Subtract a value to each pixel in the selected channel.
 
Multiply: Multiply a value to each pixel in the selected channel.
 
Divide: Divide a value to each pixel in the selected channel.
 
Make less than: Clamps the maximum value of each channel to the set value.
 
Make greater than: Clamps the minimum value of each channel to the set value.
 
Truncate: Makes all values in the selected channel multiples of the set value.

Remarks
This effect can closely simulate my "color to alpha" and "truncate resolution" plugins. It can simulate the "Transparency" plugin perfectly. It can simulate BoltBait's "gray to alpha" fairly well. It can perform "Black and White" and "Invert Colors".

 

I will probably update this at some point to make it more professional and allow multiple-channel adjustments at one time.

 
Download: Channel Operations

Source code: Github

Source code usage before the MIT license was applied is not restricted by that license.

I just had to choose a license because "no license" was ambiguous.

Edited by Joshua Lamusga
Update to source code platform
  • Upvote 1

Share this post


Link to post
Share on other sites

This has been updated to include rgb and hsv as channels. Changing rgb is the same as changing brightness. Changing hsv can produce some very strange effects, especially with truncate.

Share this post


Link to post
Share on other sites

 

What rights do we have in relation the source code? I see no license....

 

I am one of the most avid supporters of free code that you will find. It's free as in I don't care if you take the exact same code, sell it somehow, and magically make millions. There is no license and there will not be one. :)

Edited by AnthonyScoffler
  • Upvote 1

Share this post


Link to post
Share on other sites

Awesome! Thanks for contributing. One thing to note, though; unless you expressly release all rights, you have implicitly retained all rights. That's just the way IP law in the USA works. Nice for creators, too.

Share this post


Link to post
Share on other sites
On 8/25/2014 at 7:00 AM, david.atwell said:

Awesome! Thanks for contributing. One thing to note, though; unless you expressly release all rights, you have implicitly retained all rights. That's just the way IP law in the USA works. Nice for creators, too.

As of 2017, I agree. I'm licensing it under the MIT license. Naturally, anybody that used the source code before then retains my explicit permission grant to use it in any way imaginable (without the MIT clause of retaining the MIT clause).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now