xpra icon
Bug tracker and wiki

Changes between Initial Version and Version 1 of Ticket #2279


Ignore:
Timestamp:
04/21/19 06:31:30 (10 months ago)
Author:
Antoine Martin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2279

    • Property Status changed from new to assigned
  • Ticket #2279 – Description

    initial v1  
    77
    88Let's move the code to a utility function that can do the checking.
     9
     10Example {{{Image.open}}} code that could be abused:
     11{{{
     12                from PIL import Image
     13                from io import BytesIO
     14                buf = BytesIO(icondata)
     15                img = Image.open(buf)
     16                has_alpha = img.mode=="RGBA"
     17                width, height = img.size
     18                rowstride = width * (3+int(has_alpha))
     19                pixbuf = get_pixbuf_from_data(img.tobytes(), has_alpha, width, height, rowstride)
     20}}}