Skip to content

PyQt5

Use Python PIL module to merge two images


Introduction

Recently, because I have been studying the interface of the program, I got many strange problems.

I want to record today is how to merge two pictures. I found that if I simply use the composite() function in PIL, the second picture will be overwritten by the first picture. So, I started to try convert the background of the second picture to transparent.

After converting the image to a transparent background, the result of the merging is quite natural to me.

I will start to introduce how to merge two pictures in below.

Read More »Use Python PIL module to merge two images

[PyQt5] Use icon from QStyle

PyQt5

Introduction

When we using PyQt5 framework to develop a GUI program, we usually need some icon to display our buttons or components. Many times we can load pictures from outside, but if we need common icons, such as play icon, close icon, minimum icon ... etc, we can use the built-in icon picture from QStyle module.

This has another advantage: we don't have to worry about pictures when packing the GUI program.

Below I will introduce how to use the icons in QStyle.

Read More »[PyQt5] Use icon from QStyle