Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • Thanks it worked pretty well.. Is there a way to crop 190 pixels from left and right before splitting image? Commented Mar 4, 2023 at 18:14
  • 1
    @Plato sure! Just adjust the -crop specification; it's -crop {width}x{height}[+-offsetleft+-offsettop]. I show how you can do simple calculations in your shell: $(( width / 2 - 190)) for example would half the image width and subtract 190 pixels. Commented Mar 4, 2023 at 21:10
  • I need that 190 pixel gone from left for left image and right from right image though, so the formula will be: -crop "50%x100%+190+0" -crop "50%x100%+$((width / 2 - 190))" right? Commented Mar 6, 2023 at 5:30
  • on second thought, these are not correct probably. If we move the offset after getting half, in the first case it'll get 190 pixels from the right image because we move offset 190 pixels not crop 190 pixels more from left. It's the same for the other one. If we do it like this, it'll probably move it left 190 pixels. Isn't that right. Or does it crop with offsets after splitting the image in half? I thought that 50% just gives the width of the image. Commented Mar 6, 2023 at 5:41
  • 1
    Yeah you'll have to explicitly give the desired width in pixels. You want your right image to still start at half the pixels, but your left at 190. Commented Mar 6, 2023 at 6:46