Learning ImageMagick 1: LoMo Effect

Source: Internet
Author: User
Tags imagemagick

ImageMagick is a powerful image processing command line tool. Complex Image operations can be completed with only a few instructions.

The ImageMagick command design allows almost any less complex image operations to be completed using a single line of command.

In theory, a LoMo effect can be done using commands within two lines, but I do not have enough understanding of ImageMagick, and I have done it using seven lines.

As follows:

Set layer1color = "# 3066ff"
: # C0ffff "#000699"
Set layer2color = "#000699"
Sets layer1alpha = 180
Sets layer2alpha = 180

Convert % 1-fill % layer1color %-colorize 100% layer1.png
Convert layer1.png-Alpha on-Channel A-evaluate set % layer1alpha % layer1.png
Convert % 1-fill % layer2color %-colorize 100% layer2.png
Convert layer2.png-Alpha on-Channel A-evaluate set % layer2alpha % layer2.png
Convert % 1 layer1.png-Compose softlight-composite temp.png
Convert temp.png layer2.png-compose
Exclusion-composite result.png
Convert result.png-Background black-Vignette 0 × 65000 result.png

Del layer1.png
Del layer2.png
Del temp.png

Imdisplay % 2

Put the above Code in a BAT file and run it. You can also download it here. (Specify the input/output file name)

Briefly describe the code. The basic LoMo effect merging steps are divided into the following three steps: Demonstration video

1: Use a monochrome mask with an alpha channel to perform soft light composition on the input image.

2: Use an alpha-channel monochrome mask to apply the exclusion composition to the image obtained in step 1.

3: add an angle

There are also more detailed processing steps, such as glare and noise. Not considered here.

Note:

You can change the color values of the two masks and the alpha channel values to obtain different LoMo effects.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.