Cutting or merging image elements