# Set number of pixels to expand to the left, top, right, With Image.open('/path/to/image.gif') as im: This code accounts for odd pixel sizes: from PIL import Image Negative numbers for left and top will add black pixels to those edges, while numbers greater than the original width and height for right and bottom will add black pixels to those edges.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |