1
$\begingroup$

I have the following two png images which I want to left-align in one column with zero vertical spacing, retaining their original size (which is for both the same, 1600 x 542 pixels}):

I found the following question/answer but don't know how to use it for my case.

png1:

enter image description here

png2:

enter image description here

If I try the following

GraphicsColumn[{png1, png2}, Left, 0]

the result

enter image description here

I would like to have a vertical spacing of zero and the width/height of the images in the column should be the same as the original have.

How can I do that?

$\endgroup$
  • 1
    $\begingroup$ does Style[Column[{png1, png2}, Spacings -> 0], ImageSizeMultipliers -> 1] give what you need? $\endgroup$ – kglr Dec 19 '18 at 8:24
  • $\begingroup$ @kglr: Thank you very much for the solution … but what for is GraphicsColumn good, if it can not be used for this problem. $\endgroup$ – mrz Dec 19 '18 at 8:41
  • 1
    $\begingroup$ mrz, how about Style[GraphicsColumn[{png1, png2}, Spacings -> 0, Method -> {"ShrinkWrap" -> True}, ItemAspectRatio -> 1/(Divide @@ ImageDimensions[png1])], ImageSizeMultipliers -> {1, 1}]? $\endgroup$ – kglr Dec 19 '18 at 8:57
2
$\begingroup$
GraphicsColumn[{png1, png2}, 
 Spacings -> 0, 
 Method -> {"ShrinkWrap" -> True}, 
 ItemAspectRatio -> 1/(Divide @@ ImageDimensions[png1])]

enter image description here

$\endgroup$
  • $\begingroup$ Perfect … Ich had only to add at the end ImageSize -> Full, to keep the size as in the originals. $\endgroup$ – mrz Dec 19 '18 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.