Jump to content
How to Install Plugins ×

'Color Matrix' Adjustment Plugin


midora

Recommended Posts

 

'Color Matrix' Adjustment Plugin

 

NOTE:
paint.net >= 4.3.2 requires that all OptionBasedLibrary files must be placed in the Effects and the FileTypes folder.

Please ignore the out of date instructions in the ReadMe.txt file.

 

 

Summary

Adjusts all individual pixels in the selected area of the active layer using a color transformation matrix.

 

http://www.comsquare.ch/files/downloads/ColorMatrix.Effect/ColorMatrix.Effect.Dialog.jpg

 

The plugin contains a set of predefined matrices to manipulate the individual RGBA channels, adapt transparency or to simulate the effect of different color blindness defects. Changing the matrix will show 'User defined' in the preset selector. Here the list of presets:

    Identity - Does nothing
    RGB (solid) - Sets the alpha channel to solid
    RGB (inverted) - Inverts the RGB channels and keeps alpha
    RGB to Gray - Converts RGB to gray and keeps alpha
    RGB to Gray (inverted)
    RGB to Transparency
    RGB to Transparency (inverted)
    RGB to BGR (or back)
    RGB to Sepia
    Red to Gray (solid)
    Red only (solid)
    Green to Gray (solid)
    Green only (solid)
    Blue to Gray (solid)
    Blue only (solid)
    Transparency to Gray (solid)
    Transparency to Gray (solid, inverted)
    Transparency only
    Cyan only (solid)
    Magenta only (solid)
    Yellow only (solid)
    Red-Blind (Protanopia)
    Red-Weak (Protanomaly)
    Green-Blind (Deuteranopia)
    Green-Weak (Deuteranomaly)
    Blue-Blind (Tritanopia)
    Blue-Weak (Tritanomaly)
    Monochromacy (Achromatopsia)
    Weak Monochromacy (Achromatomaly)

How does it work? The following formula is applied to each pixel:
 (R,G,B,A,255) = (((R,G,B,A,255) / 255) * matrix) * 255
Result values <0 or >255 are clamped.
The render code is simple because it just provides the image and the matrix to
Windows GDI+.
 

Keywords

Adjustment, Color matrix, Color blindness

Author

Martin Osieka

Download

Find the latest version of the plugin ColorMatrix v1.1 (25.6.2015) here:  ColorMatrixEffectv1.1.zip

Installation

Follow the instructions carefully

  • Unzip "ColorMatrix.Effect vX.X.zip"
  • Copy the two files ColorMatrix.Effect.dll/.dlc and the two files OptionBasedLibrary vX.X.dll/.dlc to the Paint.NET\Effects\ folder
    A typical location is "C:\Program Files\Paint.NET\Effects".
    .dll contains the module code
    .dlc contains the module configuration (like translated text)
  • Copy the two files OptionBasedLibrary vX.X.dll/.dlc to the Paint.NET\ folder (not to the Effects folder!)
    A typical location is "C:\Program Files\Paint.NET".
  • After a restart of Paint.NET you will find the plugin at
      Menu->Adjustments->Color Matrix...
    oder für deutsche Anwender unter
      Menü->Korrekturen->Farbmatrix..

Compatibility

Paint.NET 3.5.11 and 4.0.5+

Supported languages

The language used in the plugin depends on the language setting of Paint.NET and the support of this language by the plugin. The fallback is the first supported language of the plugin. Languages are defined in the .dlc files. This plugin supports the following languages in the moment:

  • English
  • Deutsch

You may add your own translation to the .dlc file.

Known issues

None

Example

Using the matrix preset "RGB inverted"

    -1  0  0  0  0
     0 -1  0  0  0
     0  0 -1  0  0
     0  0  0  1  0
     1  1  1  0  1

Applying the formula

    R' = R/255; G' = G/255; B' = B/255; A' = A/255
    R" = R' * -1 + G' *  0 + B' *  0 + A' * 0 + 1 = 1 - R'
    G" = R' *  0 + G' * -1 + B' *  0 + A' * 0 + 1 = 1 - G'
    B" = R' *  0 + G' *  0 + B' * -1 + A' * 0 + 1 = 1 - B'
    A" = R' *  0 + G' *  0 + B' *  0 + A' * 1 + 0 = A'
    R = R"*255; G = G"*255; B = B"*255; A = A"*255

History

  • 1.1 (25.6.2015)
    - Added 'RGB (solid)' entry to set the alpha channel to opaque
    - Added column titles
    - Renamed the dll file. You have to remove the old ColorMatrix.dll/.dlc file
    - Updated OptionBasedLibrary
  • 1.0 (16.5.2015)
    - First release

 

 

Edited by Tactilis
Moderator: Clarified the required location of OptionBasedLibrary files
  • Like 1
  • Upvote 5

midoras signature.gif

Link to comment
Share on other sites

I'm liking this Martin!

It sounds complex, but with the presets it's a breeze to use and modify. An example - I recolored this image to make the knight look bronzed. Neat!

yhsjjie-165.png

Link to comment
Share on other sites

  • 1 year later...

Because setting the alpha channel of the selection to opaque is not an unusual operation, I added a preset for this to the dialog and did some clean-up.

 

Update: 1.1 (25.6.2015)
- Added 'RGB (solid)' entry to set the alpha channel to opaque
- Added column titles
- Renamed the dll file. You have to remove the old ColorMatrix.dll/.dlc file !!!
- Updated OptionBasedLibrary
 

  • Upvote 1

midoras signature.gif

Link to comment
Share on other sites

 

 

Thank you so much for the plugin and for your effort. 8omy7494.gif

Live as if you were to die tomorrow. Learn as if you were to live forever.

Gandhi

 

mae3426x.png

Link to comment
Share on other sites

What the hell happened with the Cancel button? ;-)

Sorry for some reason OptionBasedLibrary 0.7.9 moved the button out of the dialog window. This happened a while ago but nobody complained ;-) So we have to update some tools like 'Parallel Lines and Pattern', 'Color Harmonies'...

 

Back to topic. Thanks for the replies. Maybe an additional explanation:

 

There are two basic internal operations used in image processing. One is the 'Color Matrix' used to manipulate single pixels and second the 'Convolution Matrix' used to build filters like emboss. Typically a user can not access these matrices because no one likes to think about the math to reach a certain effect. So providing such plugins is just to offer people the possibility to play on this level (a basic kind of programming) and maybe to understand what's going on in the background.

 

racerx pointed to Channel Mixer. This PhotoShop tool is already one level above and a little bit more restricted. But for sure easier to use. There is an advanced channel mixer plugin here. I'm not sure if it is much easier to handle like Color Matrix. But there are sliders ;-)

midoras signature.gif

Link to comment
Share on other sites

Yes indeed Color Matrix is very advanced. Lot's of latitude for color channel adjustments. The more I play around with it, the better I like it.

 

Though not very scientific, here is a very quick simulation of Original vs Curves + vs Color Matrix.  

 

o7EQ4Zo.gif

Plane_Sig2.gif

Link to comment
Share on other sites

  • 2 years later...

Hello. The download link for 'Color Matrix' Adjustment Plugin, last updated in 2015, is currently down. Its creator, Martin Osieka, has been inactive since 2016.

I am requesting an alternative download link for the plugin, but if anyone has an alternative to it, it would also be appreciated.

 

Thanks.

Link to comment
Share on other sites

I'm sorry I don't have v1.1 archived. If someone else can provide it I'll update the link.

 

Until then - this is the version I have (v1.0): https://www.dropbox.com/s/q0xxuuwqcendmr2/colormatrix.zip?dl=0

Link to comment
Share on other sites

Version 1.0 fails to load in 4.2.10.

It provides this error

Spoiler

C:\Program Files\paint.net\Effects\ColorMatrix.dll, version 1.0.0.0

System.IO.FileNotFoundException: Could not load file or assembly 'OptionBasedLibrary v0.5, Version=0.5.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'OptionBasedLibrary v0.5, Version=0.5.0.0, Culture=neutral, PublicKeyToken=null'

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
 

 

PaintNetSignature.png.6bca4e07f5d738b2436f83d0ce1b876f.png

Link to comment
Share on other sites

Did you have the OptionBasedLibrary installed?

Link to comment
Share on other sites

On 11/14/2013 at 11:18 AM, Martin Osieka said:

Copy the two files ColorMatrix.Effect.dll/.dlc to the Paint.NET\Effects\ folder

I think this the reason. Your ZIP file only contains the DLL. Not the DLC

Option based libraries are covered from other plugins I have.

 

PaintNetSignature.png.6bca4e07f5d738b2436f83d0ce1b876f.png

Link to comment
Share on other sites

ColorMatrix.Effect.ReadMe.txt, ColorMatrix.Effect.dlc, and ColorMatrix.Effect.dll can be downloaded from a listing from here:
 

<snip>

 

BTW:
The .dll file in the .zip archive DropBox link by EER is named 'ColorMatrix.dll' instead of 'ColorMatrix.Effect.dll'
The .dll file at the GitHub link has the correct name, but does not show up under the Adjustments Menu after it is installed.

 

"Strange days, indeed!"

Edited by Ego Eram Reputo
to add more nfo / correcting errors


 

Link to comment
Share on other sites

Except that the GitHub site is another rip-off merchant who is illegally redistributing plugins.

 

Quote

@Moshyfawn

You are illegally bundling and redistributing paint.net plugins. You do not have permission to do this. You have several of my own plugins listed.

 

I am formally requesting you REMOVE your /Effects repo as per GitHub's advice here: https://help.github.com/en/github/site-policy/guide-to-submitting-a-dmca-takedown-notice.

 

If you remove the repo no further action will be taken.

 

  • Like 1
Link to comment
Share on other sites

I am sorry about that EER!
Thanks for the heads-up!

 

BTW:
I have seen several forum members, including moderators, give reverence and links to the GitHub; including your self.
I thought it was legit.

Edited by HyReZ


 

Link to comment
Share on other sites

GitHub provides a platform for programmers to build effects collaboratively. Most allow redistribution. some do not. In this case @Moshyfan did not.

 

  • Like 1

PaintNetSignature.png.6bca4e07f5d738b2436f83d0ce1b876f.png

Link to comment
Share on other sites

This Moshyfawn idiot is redistributing without permission.☹️

 

He (I assume the user is male), is redistributing my own effects. I have just downloaded one (Aardvark).
It appears to be virus free and the same size as the original but I cannot be sure.

 

However that's not the point!

He is not collaborating and not creating anything - just stealing!


@AndrewDavid & HyRez - if I take something of yours and redistribute it without your permission or knowledge how would you feel?

Let's hope E.E.R's notice will change things.

  • Like 1

 

Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings

 

PdnForumSig2.jpg

Link to comment
Share on other sites

20 hours ago, Red ochre said:

This Moshyfawn idiot is redistributing without permission.☹️

 

He (I assume the user is male)

Your assumption is correct!
I was able to locate a
Moshyfawn YouTube channel for him doing a PIP narration of an in-play video game capture from somewhere in Russia.

Edited by HyReZ


 

Link to comment
Share on other sites

11 hours ago, Red ochre said:

This Moshyfawn idiot is redistributing without permission.

 

I contacted GitHub technical support and received the following message:

 

Quote

Hello,

Thanks for contacting us. A great first step is to try contacting the user directly; in many cases, this type of thing turns out to be a misunderstanding that can be resolved by reaching out to them. You can check their profile page for contact information, or open an issue in the repository itself. If that's not possible, you may want to learn more about our DMCA takedown process.

If you are the copyright holder and want to have the content removed, you have the option of filing a DMCA takedown notice. Instructions, examples, and policy details are available here:

https://help.github.com/articles/dmca-takedown-policy/

https://help.github.com/articles/guide-to-submitting-a-dmca-takedown-notice/

If you're not the copyright holder, your best bet would be to contact the owner of the content and let them decide if they'd like to take action.

Thanks,
Devan

 

I would encourage everyone harmed by this idiot to file a DMCA takedown notice.

Link to comment
Share on other sites

2 hours ago, BoltBait said:

I would encourage everyone harmed by this idiot to file a DMCA takedown notice.

 

That is always an option, but hopefully the issue @Ego Eram Reputo opened will get them to remove the repository voluntarily.

Quoting the reply you received from GitHub support:

Quote

A great first step is to try contacting the user directly; in many cases, this type of thing turns out to be a misunderstanding that can be resolved by reaching out to them. You can check their profile page for contact information, or open an issue in the repository itself.

 

Moshyfawn's GitHub profile has a link to a Twitter account, so it may be possible to DM them.

The Twitter account includes a YouTube channel link at the top of the page, which I assume is the same one @HyReZ discovered.

 

Also, should this discussion be split into its own thread?

  • Like 1

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • 3 weeks later...

I found a copy of Color Matrix effect v.1.1 (update 25.6.2015).

I'll wait for a moderator to confirm that it's OK to upload the zip here so it can be posted on the first post. 

Xkds4Lh.png

Link to comment
Share on other sites

Please send it to me in a PM. Thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...