I am trying to create an animation with a graphic of an arm that can bend at the elbow. For this purpose I created the following two images: hand1 and hand2. I load the images with
img1 = Import["...\\hand1.png"];
img2 = Import["...\\hand2.png"];
where instead of ...
I put the proper path to the files. Next, since I want to have a handle on the position of each image within a frame of a certain size, I Inset
the images into Graphics
objects:
Gimg1 = Graphics[Inset[img1, {0, 0}, {199.5, 141.5}, 400], PlotRange -> {{-199.5, 199.5}, {-141.5, 141.5}}];
Gimg2 = Graphics[Inset[img2, {0, 0}, {199.5, 141.5}, 400], PlotRange -> {{-199.5, 199.5}, {-141.5, 141.5}}];
Now, if I try to Show
one picture on top of the other, I see that the Graphics
objects give a color artifact at the boundary where the two images overlap:
Show[{Gimg2, Gimg1}]
Here I have zoomed in and made a screenshot of the problematic region:
(the black arrow points towards the "intersection region" where the artifact appears in the form of a line of slightly lighter color than the usual background. The same lightening of color also appears at all other edges. You might have to tilt your screen up a bit to see it clearly.) On the other hand, if I directly overlap the two imported images, this artifact does not show up:
Show[{img2, img1}]
Here the corresponding zoom screenshot:
I really would like to use the Graphics
wrapper, since it allows to change the image coordinates within the frame, but the artifact above is annoying and basically a deal breaker. What should I do to get rid of this artifact? Maybe there is an other function that can display images and offers access to display coordinates? Thanks for any suggestion.