How to modify multiple images in terminal?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I need to invert multiple .png
images from black to white using command line.
I have found that I might 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 convert png
add a comment |
I need to invert multiple .png
images from black to white using command line.
I have found that I might 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 convert png
add a comment |
I need to invert multiple .png
images from black to white using command line.
I have found that I might 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 convert png
I need to invert multiple .png
images from black to white using command line.
I have found that I might 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 convert png
command-line gimp convert png
edited 4 mins ago
Juraj.Lorinc
asked Oct 26 '14 at 14:39
Juraj.LorincJuraj.Lorinc
4683717
4683717
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? Fromfor
todone
? 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; 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
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.
Thanks, perfect! For me, it wasmagick mogrify -negate *.png
asmogrify
does not seem to be a directly callable (archlinux)
– bonanza
Feb 3 at 15:19
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 |
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-modify-multiple-images-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? Fromfor
todone
? 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; 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
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? Fromfor
todone
? 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; 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
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? Fromfor
todone
? 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; 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
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? Fromfor
todone
? 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; 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
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
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.
Thanks, perfect! For me, it wasmagick mogrify -negate *.png
asmogrify
does not seem to be a directly callable (archlinux)
– bonanza
Feb 3 at 15:19
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.
Thanks, perfect! For me, it wasmagick mogrify -negate *.png
asmogrify
does not seem to be a directly callable (archlinux)
– bonanza
Feb 3 at 15:19
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.
edited Feb 4 at 14:18
answered Jan 3 at 7:37
maxagazmaxagaz
715
715
Thanks, perfect! For me, it wasmagick mogrify -negate *.png
asmogrify
does not seem to be a directly callable (archlinux)
– bonanza
Feb 3 at 15:19
add a comment |
Thanks, perfect! For me, it wasmagick mogrify -negate *.png
asmogrify
does not seem to be a directly callable (archlinux)
– bonanza
Feb 3 at 15:19
Thanks, perfect! For me, it was
magick mogrify -negate *.png
as mogrify
does not seem to be a directly callable (archlinux)– bonanza
Feb 3 at 15:19
Thanks, perfect! For me, it was
magick mogrify -negate *.png
as mogrify
does not seem to be a directly callable (archlinux)– bonanza
Feb 3 at 15:19
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!
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
user47206
answered Oct 26 '14 at 17:51
Ronald ChuaRonald Chua
865
865
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-modify-multiple-images-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