Closed LaiAlexander closed 10 months ago
It turns out this specific image has mode L, which means it is a grayscale image.
This then fails, because you can't create a color in a greyscale image.
Fix is to convert mode earlier, instead if in overlay_images(): https://github.com/ESN-Trondheim/ESNbot/blob/a61b463a083d6a47716524bb994258680b1f42ec/esnbot/graphics/coverphoto.py#L69-L75
As a side note, watermark also sort of fails because if this. It will watermark the image, but the result will also be grayscale.
Created separate issue #58 for this problem, will resolve both in the same branch/PR.
User supplied tried this command:
coverphoto facebook blue “Figure Drawing”“8th of November”
The issue is the supplied background picture, and can be easily reproduced. It seems to work as intended for other background pictures, can only reproduce with this specific image.
Use this image, and just
coverphoto
, no arguments.This function fails: https://github.com/ESN-Trondheim/ESNbot/blob/a61b463a083d6a47716524bb994258680b1f42ec/esnbot/graphics/coverphoto.py#L58-L60
Edit: This also leaves the file
coverphoto.jpg
in the directory the bot is started from, as the function fails before the files is deleted. Fails here: https://github.com/ESN-Trondheim/ESNbot/blob/a61b463a083d6a47716524bb994258680b1f42ec/esnbot/commands.py#L229 Should try to delete here: https://github.com/ESN-Trondheim/ESNbot/blob/a61b463a083d6a47716524bb994258680b1f42ec/esnbot/commands.py#L246-L247Edit 2: This is key