Photoshop RGB levels with ImageMagick

I am trying to convert some effects created in Photoshop to code for use with php / imagemagick. Right now, I'm particularly interested in how to recreate the Photoshop RGB level function. I am not very familiar with the Photoshop interface, but this is the information they give me:

RGB Level Adjust
  Input levels: Shadow 0, Midtone 0.92, Highlight 255
  Output levels: Shadow 0, Highlight 255

The higher the input and output levels? How can I translate this to ImageMagick? Below you can see what I tried, but it does not give the desired effect (converting the Photoshop 0-255 scale to 0-65535):

$im->levelImage(0, 0.92, 65535);
$im->levelImage(0, 1, 65535);

Basically, it was a blow in the dark, because the parameter names do not line up, and for the output levels the number of parameters does not even coincide. Basically, I don’t quite understand what happens when Photoshop applies the setting. I think the biggest hurdle right now. Once I get this, I need to find the appropriate effects in ImageMagick.

Can someone shed light on what is happening in Photoshop and how to copy it using ImageMagick?

+3
source share
3 answers

So, I came across this site: http://www.fmwconcepts.com/imagemagick/levels/index.php

, php, , Photoshop , .

function levels($im, $inshadow, $midtone, $inhighlight, $outshadow, $outhighlight, $channel = self::CHANNEL_ALL) {
    $im->levelImage($inshadow, $midtone, $inhighlight, $channel);
    $im->levelImage(-$outshadow, 1.0, 255 + (255 - $outhighlight), $channel);
}

, levelImage blackpoint whitepoint 0-255. 0-65535 . . , $im- > getQuantumRange(). . .

+3

, Midtones Highlights - , . , , - , - . , , , ( ).

Shadows, MidTones and Highlights

, , , , , .

, , ImageMagick API - , .

, .

+3
+1
source

All Articles