>>> from mutagen.flac import FLAC
>>> from mutagen.flac import Picture
>>>
>>> snd = FLAC("pok.flac")
>>>
>>> imgIco = Picture()
>>> imgIco.type = 1
>>> imgIco.mime = 'image/png'
>>> imgIco.desc = 'icon image'
>>> imgIco.width = 32
>>> imgIco.height = 32
>>> imgIco.colors = 0
>>> imgIco.data = open('pok_ico.png', 'r').read()
>>> snd.add_picture(imgIco)
>>>
>>> imgFront = Picture()
>>> imgFront.type = 3
>>> imgFront.mime = 'image/jpeg'
>>> imgFront.desc = 'front cover'
>>> imgFront.width = 100
>>> imgFront.height = 100
>>> imgFront.colors = 0
>>> imgFront.data = open('pok_front.jpg', 'r').read()
>>> snd.add_picture(imgFront)
>>>
>>> imgBack = Picture()
>>> imgBack.type = 4
>>> imgBack.mime = 'image/jpeg'
>>> imgBack.desc = 'back cover'
>>> imgBack.width = 50
>>> imgBack.height = 50
>>> imgBack.colors = 0
>>> imgBack.data = open('pok_back.jpg', 'r').read()
>>> snd.add_picture(imgBack)
>>>
>>> snd.pictures
[<Picture 'image/png' (854 bytes)>, <Picture 'image/jpeg' (2446
bytes)>, <Picture 'image/jpeg' (1157 bytes)>]
>>> snd.save()
For Picture.type see APIC (or http://flac.sourceforge.net/documentation_tools_flac.html#encoding_options).
I am just not sure what Picture.colors means, but it is optional, I
gues.
Best
Radek