Quantcast
Viewing all articles
Browse latest Browse all 2

Answer by Steffen Jaeschke for How to combine image in specific positions

Use

Image may be NSFW.
Clik here to view.
enter image description here

and

Show[backgr, img1Fit]

Image may be NSFW.
Clik here to view.
combination

This is a Graphics object and can be saved to image formats i. e. by Export.img1Fit is already cropped and transparent.

Show aligns the size and is able to use different formats of images.

The built-in of choice is

Overlay.

Overlay[{Graphics[{Disk[]}], Slider2D[]}, All, 2, Alignment -> Center]

Image may be NSFW.
Clik here to view.
Overlay of Mathematica 2D objects

Transparency with Overlay:

Overlay[{ExampleData[{"TestImage", "Clock"}],   Plot[Cos[x], {x, 0, 6},    Background -> Directive[{Opacity[0.5], LightOrange}]]},  Alignment -> Center]

Image may be NSFW.
Clik here to view.
Transparency with Overlay

It is possible to use Overlay in Manipulate and position and mix images interactively.

The last of the requirements is independent of the rest because Mathematica has a built-in AlphaChannel. Before exporting this built-in can be applied. This too works with 2D and 3D objects designed in Mathematica.

I am using Version 12.0.0.!

I did not receive img2 nor can I derive img2Fit but I was able to do with the variation:

finalImage =  ImageCompose[  backgr, {ImageResize[img1Fit, {232}],    ImageResize[img1Fit, {232}]}, {{Left, Bottom}, {Right, Top}}]

Image may be NSFW.
Clik here to view.
enter image description here

 SetAlphaChannel[i, ColorNegate[a]]

i=Image may be NSFW.
Clik here to view.
image

a = AlphaChannel[i]Image may be NSFW.
Clik here to view.
enter image description here

SetAlphaChannel[finalImage, ColorNegate[a]]

Image may be NSFW.
Clik here to view.
AphaChannel negated

The problem is that the image is White and only a mask with overlay remains after the negation is processed.

ColorNegate[finalImage]

Image may be NSFW.
Clik here to view.
Colornegate

SetAlphaChannel[finalImage]

Image may be NSFW.
Clik here to view.
enter image description here

Most interest in AlphaChannel intent to use Adobe products. Google finds a vast amount of community discussion about that topic:

problem AlphaChannel photoshop.

It is well known that Mathematica is somewhat cheap in images. For example if to attempt to upload a sized image output from Mathematica via Export into the Adobe graphics and foto community, Mathematica fails. I expect so that it is the very same with AlphaChannel. Mathematica gains input and advances from libraries that have advantages and disadvantages. This is the same with nearly all other programs offering AlphaChannel. So this can be taken as the sole property behavior of Adobe.

So the workaround of recommendation might be Adobe Capture. But for hard insider, this seems to depend on the license set installed on Your workstation, whether this has impact on the Adobe alpha channel. But Your question is not that detailled. Lost cost can be the idea to save the output into a pdf. Open that in Adobe Acrobat Reader and use the screenshot function in the menu Edit>Take a Snapshot.

If You stay inside the Mathematica influence program sphere this might pose the desired result, but to the Python sphere this might be different and fail.


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>