Turn an image into a background

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Josh_R

Turn an image into a background

Post by Josh_R »

I need to lighten an image to be a background on a document. How do I do that?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Turn an image into a background

Post by snibgo »

This might do the trick:

convert in.png +level 75%,100% out.png
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Turn an image into a background

Post by fmw42 »

Josh_R wrote:I need to lighten an image to be a background on a document. How do I do that?

Lighten it by how much? There are many ways to lighten and image. You can use +level, -brightness-contrast, -gamma, -modulate, -colorize, etc

see http://www.imagemagick.org/script/comma ... ptions.php
and
http://www.imagemagick.org/Usage/color/
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Turn an image into a background

Post by anthony »

It also depends if you want 'black' to remain black. That is just lighten mid-tones.

For generating a light background that is probably not wanted in which case -gamma and image multiply is not a solution.

The +level is probably best in that case. Perhaps with a gamma adjustment as part of the +level.

See IM Examples, Reversed Level Adjustments
http://www.imagemagick.org/Usage/color/#level_plus
With Gamma...
http://www.imagemagick.org/Usage/color/#level_gamma
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply