A simple tool to make an image partially transparent. Useful when, for example, making a heightfield image partially transparent to make a hole in terrain. (See https://github.com/taKana671/TerrainWithHole)
- numpy 2.1.2
- opencv-contrib-python 4.10.0.84
- opencv-python 4.10.0.84
- pillow 11.0.0
- Python 3.11
- Windows11
- Execute a command below on your command line.
>>>cd image_editor
>>>python image_editor.py
- Click [File > Open] to select an image file.
- Select the area that you want make transparent by mouse dragging.
- Click [File > Save] to save the image. The image made partially transparent will be output.
- Click [Edit > Undo] and select transparent area to undo the changes.
- Input alpha value in the range from 0 to 255 into the alpha field to change transparency.
output file
- Execute a command below on your command line.
- Create a hole by making the triangles in the block of geomipterrain at the clicked position invisible.
>>>cd invisible_triangle
>>>python create_terrain.py