I'm not very advanced and when it comes to Imagemagick I would rather stick to command-prompt rather than Perl or other advanced programming.
Bascially, what I want to do is vary the brightness and contrast of parts of an image rather than the whole thing. Something like this:
Can it be done? Thank you.
Alter brightness and contrast of parts of an image
-
- Posts: 3
- Joined: 2013-04-14T07:08:34-07:00
- Authentication code: 6789
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Alter brightness and contrast of parts of an image
Your image didn't come through. But yes, that's easy. For example:
This takes img.png, changes the brightness and contrast but only where the mask is black, with the effect fading to nothing where the mask is white.
See http://www.imagemagick.org/script/comma ... s.php#mask
Code: Select all
convert img.png -mask mask.png -level 30%%,60%% +mask imgOut.png
See http://www.imagemagick.org/script/comma ... s.php#mask
snibgo's IM pages: im.snibgo.com
-
- Posts: 3
- Joined: 2013-04-14T07:08:34-07:00
- Authentication code: 6789
Re: Alter brightness and contrast of parts of an image
Sorry, I was not very clear. What I want to do is vary the brightness and contrast of parts of the image in order to make little squares appear but keeping the background essentially intact.
Here's a link to the kind of image I want to end up with:
http://img295.imagevenue.com/img.php?im ... _496lo.jpg
Here's a link to the kind of image I want to end up with:
http://img295.imagevenue.com/img.php?im ... _496lo.jpg
Re: Alter brightness and contrast of parts of an image
I had two other windows open as well as the image when I followed that link and one was a porn link
As snibgo said create a mask with square black boxes where you want the light areas.
As snibgo said create a mask with square black boxes where you want the light areas.
-
- Posts: 3
- Joined: 2013-04-14T07:08:34-07:00
- Authentication code: 6789
Re: Alter brightness and contrast of parts of an image
Sorry about the links to the porn sites. When I uploaded the image I did specify that this was a family-friendly image and my Firefox is designed to block pop-up boxes so I was unaware of this.
Anyway, I researched the "mask" option and this led to the "region" option which provided me with what I required:
convert flowers.jpg -region 115x140+45+10 -brightness-contrast -70x-20 -region 115x140+45+170 -brightness-contrast -70x-20 flowers2.jpg
Thank you for the pointers.
Anyway, I researched the "mask" option and this led to the "region" option which provided me with what I required:
convert flowers.jpg -region 115x140+45+10 -brightness-contrast -70x-20 -region 115x140+45+170 -brightness-contrast -70x-20 flowers2.jpg
Thank you for the pointers.