def getImageDescriptor(self, im, xy=None):
        """ getImageDescriptor(im, xy=None)

        Used for the local color table properties per image.
        Otherwise global color table applies to all frames irrespective of
        whether additional colors comes in play that require a redefined
        palette. Still a maximum of 256 color per frame, obviously.

        Written by Ant1 on 2010-08-22
        Modified by Alex Robinson in Janurary 2011 to implement subrectangles.

        """

        # Default use full image and place at upper left
        if xy is None:
            xy = (0, 0)

        # Image separator,
        bb = b'\x2C'

        # Image position and size
        bb += intToBin(xy[0])  # Left position
        bb += intToBin(xy[1])  # Top position
        bb += intToBin(im.size[0])  # image width
        bb += intToBin(im.size[1])  # image height

        # packed field: local color table flag1, interlace0, sorted table0,
        # reserved00, lct size111=7=2^(7+1)=256.
        bb += b'\x87'

        # LZW minimum size code now comes later, begining of [image data] blocks
        return bb
getImageDescriptor(im, xy=None)

        Used for the local color table properties per image.
        Otherwise global color table applies to all frames irrespective of
        whether additional colors comes in play that require a redefined
        palette. Still a maximum of 256 color per frame, obviously.

        Written by Ant1 on 2010-08-22
        Modified by Alex Robinson in Janurary 2011 to implement subrectangles.