LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-24-2006, 09:20 PM   #1
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
ImageMagick - how to convert green pixels to red?


Does anyone know how to move all the green pixels in an image to red pixels?

I don't want to just change the hue, I want to make the green channel red.
 
Old 03-24-2006, 09:26 PM   #2
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Original Poster
Rep: Reputation: 51
figures... as soon as I post it, I find a solution... For those who are curious:

convert some_image.jpg \( +clone -channel G -fx R \) +swap -channel R -fx v.G swapped.jpg
 
Old 03-13-2017, 06:52 AM   #3
mideal
LQ Newbie
 
Registered: May 2016
Posts: 6

Rep: Reputation: Disabled
Thumbs up

convert some_image.jpg \( +clone -channel G -fx R \) +swap -channel R -fx v.G swapped.jpg[/QUOTE]

Hail Brian,

I'll take that as a sign (with your holy sandal :-) praising you as the Hero of the Day! - even years gone after posting that.

(To complete the example: Choose R, G and B for red, green, blue color channel.)

THANKS A LOT!
 
Old 03-13-2017, 07:39 AM   #4
mideal
LQ Newbie
 
Registered: May 2016
Posts: 6

Rep: Reputation: Disabled
After using it on a bunch of files (working on a Cinnamon theme) I realized that this is not the perfect solution.
A lot of - even greenish - colors already consist partly of red and blue. If you only replace the green RGB part by blue, the result is a bit violet because the red part play a bigger role now.
I'll try a more "rotating" mode to change that...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ImageMagick-Convert, resize width, keep aspect cadj Linux - Software 2 06-18-2010 05:10 PM
imagemagick or pcdtoppm script to convert pcd to jpeg? jst1 Linux - Software 1 02-01-2006 05:26 PM
Using ImageMagick Convert RGB -> indexed colors paulsm4 Programming 0 01-17-2006 04:06 PM
startx produces vertical red,blue, green lines Warmduvet Slackware - Installation 4 09-14-2004 03:21 PM
Strange mouse resolution ? 2 pixels by 2 pixels Creak Linux - General 8 04-18-2004 07:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration