Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(37)  |  Call(21)  |  Derive(0)  |  Import(16)
Return a list of strings representing this image.
The first string is a local image header, the rest contains
encoded image data.

        def getdata(im, offset = (0, 0), **params):
    """Return a list of strings representing this image.
       The first string is a local image header, the rest contains
       encoded image data."""

    class collector:
        data = []
        def write(self, data):
            self.data.append(data)

    im.load() # make sure raster data is available

    fp = collector()

    try:
        im.encoderinfo = params

        # local image header
        fp.write(b"," +
                 o16(offset[0]) +       # offset
                 o16(offset[1]) +
                 o16(im.size[0]) +      # size
                 o16(im.size[1]) +
                 o8(0) +                # flags
                 o8(8))                 # bits

        ImageFile._save(im, fp, [("gif", (0,0)+im.size, 0, RAWMODE[im.mode])])

        fp.write(b"\0") # end of image data

    finally:
        del im.encoderinfo

    return fp.data
        


src/s/i/SimpleCV-HEAD/SimpleCV/examples/web-based/cloudanimator/images2gif.py   SimpleCV(Download)
    import PIL
    from PIL import Image, ImageChops
    from PIL.GifImagePlugin import getheader, getdata
except ImportError:
    PIL = None
            # gather data
            palette = getheader(im)[1]
            data = getdata(im)
            imdes, data = data[0], data[1:]
            header = getheaderAnim(im)
        else:
            # gather info (compress difference)
            data = getdata(im)
            imdes, data = data[0], data[1:]
            graphext = getGraphicsControlExt(durations[frames])

src/p/i/Pillow-2.4.0/Scripts/gifmaker.py   Pillow(Download)
from PIL import Image, ImageChops
 
from PIL.GifImagePlugin import getheader, getdata
 
# --------------------------------------------------------------------
 
            # global header
            for s in getheader(im) + getdata(im):
                fp.write(s)
 
 
                # compress difference
                for s in getdata(im.crop(bbox), offset = bbox[:2]):
                    fp.write(s)
 

src/p/i/Pillow-HEAD/Scripts/gifmaker.py   Pillow(Download)
from PIL import Image, ImageChops
 
from PIL.GifImagePlugin import getheader, getdata
 
# --------------------------------------------------------------------
 
            # global header
            for s in getheader(im) + getdata(im):
                fp.write(s)
 
 
                # compress difference
                for s in getdata(im.crop(bbox), offset = bbox[:2]):
                    fp.write(s)
 

src/c/x/CXPhasing-0.3.0/cxphasing/images2gif.py   CXPhasing(Download)
    import PIL
    from PIL import Image, ImageChops
    from PIL.GifImagePlugin import getheader, getdata
except ImportError:
    PIL = None
            # gather data
            palette = getheader(im)[1]
            data = getdata(im)
            imdes, data = data[0], data[1:]            
            header = getheaderAnim(im)
        else:
            # gather info (compress difference)              
            data = getdata(im) 
            imdes, data = data[0], data[1:]       
            graphext = getGraphicsControlExt(durations[frames])

src/f/l/flightloggin2-HEAD/graphs/images2gif.py   flightloggin2(Download)
    import PIL
    from PIL import Image, ImageChops
    from PIL.GifImagePlugin import getheader, getdata
except ImportError:
    PIL = None
            # gather data
            palette = getheader(im)[1]
            data = getdata(im)
            imdes, data = data[0], data[1:]            
            header = getheaderAnim(im)
        else:
            # gather info (compress difference)              
            data = getdata(im) 
            imdes, data = data[0], data[1:]       
            graphext = getGraphicsControlExt(durations[frames])

src/d/o/dotHiero-HEAD/Startup/images2gif.py   dotHiero(Download)
    import PIL
    from PIL import Image, ImageChops
    from PIL.GifImagePlugin import getheader, getdata
except ImportError:
    PIL = None
            # gather data
            palette = getheader(im)[1]
            data = getdata(im)
            imdes, data = data[0], data[1:]            
            header = getheaderAnim(im)
        else:
            # gather info (compress difference)              
            data = getdata(im) 
            imdes, data = data[0], data[1:]       
            graphext = getGraphicsControlExt(durations[frames])

src/t/h/thumbor-4.1.3/thumbor/engines/extensions/pil.py   thumbor(Download)
    import PIL
    from PIL import Image
    from PIL.GifImagePlugin import getheader, getdata
except ImportError:
    PIL = None
 
                # Gather info
                data = getdata(im)
 
                imdes, data = data[0], data[1:]

src/t/h/thumbor-HEAD/thumbor/engines/extensions/pil.py   thumbor(Download)
    import PIL
    from PIL import Image
    from PIL.GifImagePlugin import getheader, getdata
except ImportError:
    PIL = None
 
                # Gather info
                data = getdata(im)
 
                imdes, data = data[0], data[1:]

src/a/p/appengine-mandelbrot-python-HEAD/mandelbrot_animation.py   appengine-mandelbrot-python(Download)
        stream.write('\x00\x00')
 
        data = GifImagePlugin.getdata(im)
        for d in data:
            stream.write(d)

src/d/j/django-cropduster-4.2.24/cropduster/utils/images2gif.py   django-cropduster(Download)
    import PIL
    from PIL import Image
    from PIL.GifImagePlugin import getheader, getdata
except ImportError:
    PIL = None
 
                # Gather info
                data = getdata(im)
                imdes, data = data[0], data[1:]
 

  1 | 2  Next