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?".

From what I understand, basically photoshop does it by blending colors of the two images on regions where they overlap, and it can specify the colors in each image that need to be modified and specify the extent of each color to use from each image in order to generate a gradually-transformed color. I have read the IM examples and Fred's scripts, but still couldn't find something that's exactly what I want. Is it possible to do this?

Here is one way (perhaps not the most efficient, but it makes it easy to demostrate):

original:

The following makes a random noise image and thresholds it at 50%. Then it makes a white on black text image. Then it composites the two by multiplication to have textured white text on black background.

Thanks for the reply. However, I think it's more of a regulated distortion of the text, not some random noise. Note how the background image has different shades and colors. These would affect how the text is blended. I'm not too sure exactly what PS is doing underneath, but it seems it's converting part of the text to transparent or semi transparent according to the color/shade of the overlapping background image, to create a gradual "blend" effect with the background... or am I missing something?

I believe PS does this by controlling pixels with certain color/shade on different layers/images. Look at the following sentence (I quoted from the other site):
"Moving the black and white sliders for the bar on top will cause areas of the currently selected layer to disappear from view. Moving the sliders for the bar on the bottom will cause areas of the layer(s) below the currently selected layer to show through the selected layer, as if it's punching holes through the layer. In other words, since I had my type layer selected, if I move the sliders on the top bar in towards the center, I'll be making areas in my type disappear. If I move the bottom bar's sliders in towards the center, I'll be making areas of my brick wall photo show through my type. Moving the white slider affects the lightest areas in the image, and moving the black slider affects the darkest areas. The further I move the sliders, the greater the tonal range that's affected.".
...
and a single slider point (similar to Fred's threshold) has the problem of "The areas where the brick wall is showing through the type are too harsh. It's either the text showing 100% or the wall behind it showing 100%". To make "a subtle transition between the two to smooth things out and make it look more realistic ...", the slider can be split to two points, and "With the black slider now split in two, the half on the left is where the blending begins, the half on the right is where the blending reaches 100%, and the area in between is the transition area. I can now drag both halves independently of each other".

So my understanding is, the background image is considered as grayscale, and there are two thresholds for black-like pixels, the pixels below the lower threshold and above the upper threshold are not changed, the pixels between the range are changed, with a smooth/gradual blend with the top layer (maybe -compose multiply?) And changes to white-like pixels can be done in the same way, while the changes to both black and white can be done independently/simultaneously.