Search code examples
javascriptpythonphotoshoppsd

How to merge diffent layers to a bmp file?


I would like Photoshop to automatically execute the following task

  1. get the icon on layers infomation: position width hight
  2. extract diffent layers and merge them to a bmp file

i am familiar with python, but javascript is ok if it could do


Solution

  • If you want to do this on Photoshop, you need to record an action and apply it to any photo.

    If you want to do this on Python, I do not know what API you want to use but the general process is to create a mask based on the position and size information from the icon image and, with bitwise operations, to merge it to the other layers. Then save it as a bmp file.

    Here an example Bitwise Operations in OpenCV