How to invert colors in multiple images using Gimp in terminal?
I need to convert multiple .png images from black (and dark grey) to white (and light grey). I have found that I eed to use gimp plugin "plug-in-vinvert" but I can not figure out how to use it. I have tried something like
gimp -b '(plug-in-vinvert "INT32" "filename.png" "/resultsFolder/")'
and many other combinations but with no success.
command-line gimp png
add a comment |
I need to convert multiple .png images from black (and dark grey) to white (and light grey). I have found that I eed to use gimp plugin "plug-in-vinvert" but I can not figure out how to use it. I have tried something like
gimp -b '(plug-in-vinvert "INT32" "filename.png" "/resultsFolder/")'
and many other combinations but with no success.
command-line gimp png
add a comment |
I need to convert multiple .png images from black (and dark grey) to white (and light grey). I have found that I eed to use gimp plugin "plug-in-vinvert" but I can not figure out how to use it. I have tried something like
gimp -b '(plug-in-vinvert "INT32" "filename.png" "/resultsFolder/")'
and many other combinations but with no success.
command-line gimp png
I need to convert multiple .png images from black (and dark grey) to white (and light grey). I have found that I eed to use gimp plugin "plug-in-vinvert" but I can not figure out how to use it. I have tried something like
gimp -b '(plug-in-vinvert "INT32" "filename.png" "/resultsFolder/")'
and many other combinations but with no success.
command-line gimp png
command-line gimp png
asked Oct 26 '14 at 14:39
Juraj.LorincJuraj.Lorinc
4493716
4493716
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
Why gimp? Try imagemagick package. It's a great command line image processor.
In your case you can use it like:
convert -negate src.png dst.png
It works, except it converts only one file.
– Juraj.Lorinc
Oct 26 '14 at 16:53
1
Add loop:for i in `ls *.jpg`; do convert ${i%.*}.png ${i%.*}-inverted.png; done
– OhmSpectator
Oct 26 '14 at 17:06
I have tried your code, but it is not working for me. I guess I am doing some stupid mistake, because I am quite new with Linux. I paste your code directly into terminal and when i press enter, all I get is ">".
– Juraj.Lorinc
Oct 27 '14 at 9:16
Are you sure you have copied the whole string? Fromfortodone? BTW, there is a mistake in the string: not*.jpg, but*.png. So the right one:for i in `ls *.png`; do convert ${i%.*}.png ${i%.*}-inverted.png; done
– OhmSpectator
Oct 27 '14 at 11:45
1
I was not working because I have copied it without the "done". You have there one small error, but the working code isfor i in `ls *.png`; do convert -negate ${i%.*}.png results/${i%.*}.png; doneI have just added-negateand changed the code to place the inverted images into "results" folder.
– Juraj.Lorinc
Oct 28 '14 at 22:38
|
show 3 more comments
Try this GIMP plugin for performing a routine on multiple images simultaneously: "Batch Image Manipulation Plugin" http://registry.gimp.org/node/26259
Download and extract the package, open a terminal inside the resulting folder, and run:
make && make install
Then start Gimp, go to File - Batch Image Manipulation, in order to start the plugin. There you can add the multiple images.

As the question asks for inverting colors, add the corresponding manipulation set: Add - Other GIMP procedure, search for 'invert' and you will find 'gimp-invert'

OK, and before 'Apply' you can set the output folder which by default is ~/.
Hope that helps. Have fun GIMPing!
add a comment |
To convert a batch of images, the fastest and shortest way I know is to use the following ImageMagick command:
mogrify -negate *.jpg
N.B. Change image format accordingly and make sure you have a copy of the original images)
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f541887%2fhow-to-invert-colors-in-multiple-images-using-gimp-in-terminal%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Why gimp? Try imagemagick package. It's a great command line image processor.
In your case you can use it like:
convert -negate src.png dst.png
It works, except it converts only one file.
– Juraj.Lorinc
Oct 26 '14 at 16:53
1
Add loop:for i in `ls *.jpg`; do convert ${i%.*}.png ${i%.*}-inverted.png; done
– OhmSpectator
Oct 26 '14 at 17:06
I have tried your code, but it is not working for me. I guess I am doing some stupid mistake, because I am quite new with Linux. I paste your code directly into terminal and when i press enter, all I get is ">".
– Juraj.Lorinc
Oct 27 '14 at 9:16
Are you sure you have copied the whole string? Fromfortodone? BTW, there is a mistake in the string: not*.jpg, but*.png. So the right one:for i in `ls *.png`; do convert ${i%.*}.png ${i%.*}-inverted.png; done
– OhmSpectator
Oct 27 '14 at 11:45
1
I was not working because I have copied it without the "done". You have there one small error, but the working code isfor i in `ls *.png`; do convert -negate ${i%.*}.png results/${i%.*}.png; doneI have just added-negateand changed the code to place the inverted images into "results" folder.
– Juraj.Lorinc
Oct 28 '14 at 22:38
|
show 3 more comments
Why gimp? Try imagemagick package. It's a great command line image processor.
In your case you can use it like:
convert -negate src.png dst.png
It works, except it converts only one file.
– Juraj.Lorinc
Oct 26 '14 at 16:53
1
Add loop:for i in `ls *.jpg`; do convert ${i%.*}.png ${i%.*}-inverted.png; done
– OhmSpectator
Oct 26 '14 at 17:06
I have tried your code, but it is not working for me. I guess I am doing some stupid mistake, because I am quite new with Linux. I paste your code directly into terminal and when i press enter, all I get is ">".
– Juraj.Lorinc
Oct 27 '14 at 9:16
Are you sure you have copied the whole string? Fromfortodone? BTW, there is a mistake in the string: not*.jpg, but*.png. So the right one:for i in `ls *.png`; do convert ${i%.*}.png ${i%.*}-inverted.png; done
– OhmSpectator
Oct 27 '14 at 11:45
1
I was not working because I have copied it without the "done". You have there one small error, but the working code isfor i in `ls *.png`; do convert -negate ${i%.*}.png results/${i%.*}.png; doneI have just added-negateand changed the code to place the inverted images into "results" folder.
– Juraj.Lorinc
Oct 28 '14 at 22:38
|
show 3 more comments
Why gimp? Try imagemagick package. It's a great command line image processor.
In your case you can use it like:
convert -negate src.png dst.png
Why gimp? Try imagemagick package. It's a great command line image processor.
In your case you can use it like:
convert -negate src.png dst.png
edited Oct 26 '14 at 15:43
muru
1
1
answered Oct 26 '14 at 15:04
OhmSpectatorOhmSpectator
35636
35636
It works, except it converts only one file.
– Juraj.Lorinc
Oct 26 '14 at 16:53
1
Add loop:for i in `ls *.jpg`; do convert ${i%.*}.png ${i%.*}-inverted.png; done
– OhmSpectator
Oct 26 '14 at 17:06
I have tried your code, but it is not working for me. I guess I am doing some stupid mistake, because I am quite new with Linux. I paste your code directly into terminal and when i press enter, all I get is ">".
– Juraj.Lorinc
Oct 27 '14 at 9:16
Are you sure you have copied the whole string? Fromfortodone? BTW, there is a mistake in the string: not*.jpg, but*.png. So the right one:for i in `ls *.png`; do convert ${i%.*}.png ${i%.*}-inverted.png; done
– OhmSpectator
Oct 27 '14 at 11:45
1
I was not working because I have copied it without the "done". You have there one small error, but the working code isfor i in `ls *.png`; do convert -negate ${i%.*}.png results/${i%.*}.png; doneI have just added-negateand changed the code to place the inverted images into "results" folder.
– Juraj.Lorinc
Oct 28 '14 at 22:38
|
show 3 more comments
It works, except it converts only one file.
– Juraj.Lorinc
Oct 26 '14 at 16:53
1
Add loop:for i in `ls *.jpg`; do convert ${i%.*}.png ${i%.*}-inverted.png; done
– OhmSpectator
Oct 26 '14 at 17:06
I have tried your code, but it is not working for me. I guess I am doing some stupid mistake, because I am quite new with Linux. I paste your code directly into terminal and when i press enter, all I get is ">".
– Juraj.Lorinc
Oct 27 '14 at 9:16
Are you sure you have copied the whole string? Fromfortodone? BTW, there is a mistake in the string: not*.jpg, but*.png. So the right one:for i in `ls *.png`; do convert ${i%.*}.png ${i%.*}-inverted.png; done
– OhmSpectator
Oct 27 '14 at 11:45
1
I was not working because I have copied it without the "done". You have there one small error, but the working code isfor i in `ls *.png`; do convert -negate ${i%.*}.png results/${i%.*}.png; doneI have just added-negateand changed the code to place the inverted images into "results" folder.
– Juraj.Lorinc
Oct 28 '14 at 22:38
It works, except it converts only one file.
– Juraj.Lorinc
Oct 26 '14 at 16:53
It works, except it converts only one file.
– Juraj.Lorinc
Oct 26 '14 at 16:53
1
1
Add loop:
for i in `ls *.jpg`; do convert ${i%.*}.png ${i%.*}-inverted.png; done– OhmSpectator
Oct 26 '14 at 17:06
Add loop:
for i in `ls *.jpg`; do convert ${i%.*}.png ${i%.*}-inverted.png; done– OhmSpectator
Oct 26 '14 at 17:06
I have tried your code, but it is not working for me. I guess I am doing some stupid mistake, because I am quite new with Linux. I paste your code directly into terminal and when i press enter, all I get is ">".
– Juraj.Lorinc
Oct 27 '14 at 9:16
I have tried your code, but it is not working for me. I guess I am doing some stupid mistake, because I am quite new with Linux. I paste your code directly into terminal and when i press enter, all I get is ">".
– Juraj.Lorinc
Oct 27 '14 at 9:16
Are you sure you have copied the whole string? From
for to done? BTW, there is a mistake in the string: not *.jpg, but *.png. So the right one: for i in `ls *.png`; do convert ${i%.*}.png ${i%.*}-inverted.png; done– OhmSpectator
Oct 27 '14 at 11:45
Are you sure you have copied the whole string? From
for to done? BTW, there is a mistake in the string: not *.jpg, but *.png. So the right one: for i in `ls *.png`; do convert ${i%.*}.png ${i%.*}-inverted.png; done– OhmSpectator
Oct 27 '14 at 11:45
1
1
I was not working because I have copied it without the "done". You have there one small error, but the working code is
for i in `ls *.png`; do convert -negate ${i%.*}.png results/${i%.*}.png; done I have just added -negate and changed the code to place the inverted images into "results" folder.– Juraj.Lorinc
Oct 28 '14 at 22:38
I was not working because I have copied it without the "done". You have there one small error, but the working code is
for i in `ls *.png`; do convert -negate ${i%.*}.png results/${i%.*}.png; done I have just added -negate and changed the code to place the inverted images into "results" folder.– Juraj.Lorinc
Oct 28 '14 at 22:38
|
show 3 more comments
Try this GIMP plugin for performing a routine on multiple images simultaneously: "Batch Image Manipulation Plugin" http://registry.gimp.org/node/26259
Download and extract the package, open a terminal inside the resulting folder, and run:
make && make install
Then start Gimp, go to File - Batch Image Manipulation, in order to start the plugin. There you can add the multiple images.

As the question asks for inverting colors, add the corresponding manipulation set: Add - Other GIMP procedure, search for 'invert' and you will find 'gimp-invert'

OK, and before 'Apply' you can set the output folder which by default is ~/.
Hope that helps. Have fun GIMPing!
add a comment |
Try this GIMP plugin for performing a routine on multiple images simultaneously: "Batch Image Manipulation Plugin" http://registry.gimp.org/node/26259
Download and extract the package, open a terminal inside the resulting folder, and run:
make && make install
Then start Gimp, go to File - Batch Image Manipulation, in order to start the plugin. There you can add the multiple images.

As the question asks for inverting colors, add the corresponding manipulation set: Add - Other GIMP procedure, search for 'invert' and you will find 'gimp-invert'

OK, and before 'Apply' you can set the output folder which by default is ~/.
Hope that helps. Have fun GIMPing!
add a comment |
Try this GIMP plugin for performing a routine on multiple images simultaneously: "Batch Image Manipulation Plugin" http://registry.gimp.org/node/26259
Download and extract the package, open a terminal inside the resulting folder, and run:
make && make install
Then start Gimp, go to File - Batch Image Manipulation, in order to start the plugin. There you can add the multiple images.

As the question asks for inverting colors, add the corresponding manipulation set: Add - Other GIMP procedure, search for 'invert' and you will find 'gimp-invert'

OK, and before 'Apply' you can set the output folder which by default is ~/.
Hope that helps. Have fun GIMPing!
Try this GIMP plugin for performing a routine on multiple images simultaneously: "Batch Image Manipulation Plugin" http://registry.gimp.org/node/26259
Download and extract the package, open a terminal inside the resulting folder, and run:
make && make install
Then start Gimp, go to File - Batch Image Manipulation, in order to start the plugin. There you can add the multiple images.

As the question asks for inverting colors, add the corresponding manipulation set: Add - Other GIMP procedure, search for 'invert' and you will find 'gimp-invert'

OK, and before 'Apply' you can set the output folder which by default is ~/.
Hope that helps. Have fun GIMPing!
edited Nov 23 '16 at 18:10
cipricus
10.1k47172341
10.1k47172341
answered Oct 26 '14 at 17:51
Ronald ChuaRonald Chua
865
865
add a comment |
add a comment |
To convert a batch of images, the fastest and shortest way I know is to use the following ImageMagick command:
mogrify -negate *.jpg
N.B. Change image format accordingly and make sure you have a copy of the original images)
add a comment |
To convert a batch of images, the fastest and shortest way I know is to use the following ImageMagick command:
mogrify -negate *.jpg
N.B. Change image format accordingly and make sure you have a copy of the original images)
add a comment |
To convert a batch of images, the fastest and shortest way I know is to use the following ImageMagick command:
mogrify -negate *.jpg
N.B. Change image format accordingly and make sure you have a copy of the original images)
To convert a batch of images, the fastest and shortest way I know is to use the following ImageMagick command:
mogrify -negate *.jpg
N.B. Change image format accordingly and make sure you have a copy of the original images)
answered Jan 3 at 7:37
maxagazmaxagaz
615
615
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f541887%2fhow-to-invert-colors-in-multiple-images-using-gimp-in-terminal%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown