What I learned from writing three Python books in a year
Over the past year or so, I have written three e-books on various topics in Python programming. Although I certainly don’t consider myself to be an expert on self-publishing, I have learned a bit in this time, so I will share it here. I hope you might find it useful.
This article covers four stages:
I have found the whole process takes me about 3 months, if I put most of my hobby time into it. …
Process images in 3 lines of Python
Pillow is a versatile and popular Python imaging library. The ImageEnhance module is a particularly useful module within Pillow. It can be used to adjust colour, contrast, brightness and sharpness in a few simple lines of code.
Each image enhance function is implemented as an object that implements the
_Enhance interface. The interface provides a single method:
For example, the
ImageEnhance.Brightness class controls the brightness of an image, It has an
enhance method that it inherits from
factor is a number that controls the effect. For example, for
factor of less than 1.0 makes the image darker (and a value of 0.0 makes the image completely black). A
factor of greater than 1.0 makes the image brighter. …
Easy animation with generativepy
generativepy makes it very easy to create animated GIFs. This can be done with a simple script, and usually results in a fairly well optimised GIf file.
gif module makes use of the gifsicle application. This can be downloaded for free, and must be installed on your system in order for the
gif module to work.
GIF (Graphics Interchange Format) is a bitmap image format that was developed in the 1980s for transferring images over networks. …