Linux biogene 3.16.0-11-amd64 #1 SMP Debian 3.16.84-1 (2020-06-09) x86_64
Apache
: 46.101.124.208 | : 18.189.171.154
Cant Read [ /etc/named.conf ]
5.6.40-0+deb8u12
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
lib /
python2.7 /
dist-packages /
PIL /
[ HOME SHELL ]
Name
Size
Permission
Action
BdfFontFile.py
3.28
KB
-rw-r--r--
BdfFontFile.pyc
2.83
KB
-rw-r--r--
BmpImagePlugin.py
7.26
KB
-rw-r--r--
BmpImagePlugin.pyc
6.13
KB
-rw-r--r--
BufrStubImagePlugin.py
1.47
KB
-rw-r--r--
BufrStubImagePlugin.pyc
1.99
KB
-rw-r--r--
ContainerIO.py
2.54
KB
-rw-r--r--
ContainerIO.pyc
2.07
KB
-rw-r--r--
CurImagePlugin.py
1.9
KB
-rw-r--r--
CurImagePlugin.pyc
1.63
KB
-rw-r--r--
DcxImagePlugin.py
1.76
KB
-rw-r--r--
DcxImagePlugin.pyc
1.89
KB
-rw-r--r--
EpsImagePlugin.py
12.11
KB
-rw-r--r--
EpsImagePlugin.pyc
9.92
KB
-rw-r--r--
ExifTags.py
4.97
KB
-rw-r--r--
ExifTags.pyc
5.27
KB
-rw-r--r--
FitsStubImagePlugin.py
1.61
KB
-rw-r--r--
FitsStubImagePlugin.pyc
2
KB
-rw-r--r--
FliImagePlugin.py
3.38
KB
-rw-r--r--
FliImagePlugin.pyc
3.49
KB
-rw-r--r--
FontFile.py
2.76
KB
-rw-r--r--
FontFile.pyc
2.87
KB
-rw-r--r--
FpxImagePlugin.py
6.21
KB
-rw-r--r--
FpxImagePlugin.pyc
4.62
KB
-rw-r--r--
GbrImagePlugin.py
1.54
KB
-rw-r--r--
GbrImagePlugin.pyc
1.8
KB
-rw-r--r--
GdImageFile.py
2.13
KB
-rw-r--r--
GdImageFile.pyc
1.7
KB
-rw-r--r--
GifImagePlugin.py
16.47
KB
-rw-r--r--
GifImagePlugin.pyc
10.32
KB
-rw-r--r--
GimpGradientFile.py
3.26
KB
-rw-r--r--
GimpGradientFile.pyc
3.68
KB
-rw-r--r--
GimpPaletteFile.py
1.3
KB
-rw-r--r--
GimpPaletteFile.pyc
1.47
KB
-rw-r--r--
GribStubImagePlugin.py
1.47
KB
-rw-r--r--
GribStubImagePlugin.pyc
2
KB
-rw-r--r--
Hdf5StubImagePlugin.py
1.51
KB
-rw-r--r--
Hdf5StubImagePlugin.pyc
2
KB
-rw-r--r--
IcnsImagePlugin.py
8.99
KB
-rw-r--r--
IcnsImagePlugin.pyc
8.71
KB
-rw-r--r--
IcoImagePlugin.py
7.56
KB
-rw-r--r--
IcoImagePlugin.pyc
6.07
KB
-rw-r--r--
ImImagePlugin.py
9.87
KB
-rw-r--r--
ImImagePlugin.pyc
8.01
KB
-rw-r--r--
Image.py
78.54
KB
-rw-r--r--
Image.pyc
73.54
KB
-rw-r--r--
ImageChops.py
6.04
KB
-rw-r--r--
ImageChops.pyc
7.68
KB
-rw-r--r--
ImageCms.py
36.25
KB
-rw-r--r--
ImageCms.pyc
33.86
KB
-rw-r--r--
ImageColor.py
7.79
KB
-rw-r--r--
ImageColor.pyc
7.79
KB
-rw-r--r--
ImageDraw.py
11.39
KB
-rw-r--r--
ImageDraw.pyc
8.63
KB
-rw-r--r--
ImageDraw2.py
3.12
KB
-rw-r--r--
ImageDraw2.pyc
5.06
KB
-rw-r--r--
ImageEnhance.py
3.1
KB
-rw-r--r--
ImageEnhance.pyc
4.11
KB
-rw-r--r--
ImageFile.py
15.65
KB
-rw-r--r--
ImageFile.pyc
11.4
KB
-rw-r--r--
ImageFileIO.py
1022
B
-rw-r--r--
ImageFileIO.pyc
1.22
KB
-rw-r--r--
ImageFilter.py
6.29
KB
-rw-r--r--
ImageFilter.pyc
10.83
KB
-rw-r--r--
ImageFont.py
17.19
KB
-rw-r--r--
ImageFont.pyc
17.14
KB
-rw-r--r--
ImageGrab.py
1.19
KB
-rw-r--r--
ImageGrab.pyc
1.18
KB
-rw-r--r--
ImageMath.py
7.28
KB
-rw-r--r--
ImageMath.pyc
10.63
KB
-rw-r--r--
ImageMode.py
1.27
KB
-rw-r--r--
ImageMode.pyc
1.33
KB
-rw-r--r--
ImageMorph.py
7.78
KB
-rw-r--r--
ImageMorph.pyc
7.99
KB
-rw-r--r--
ImageOps.py
12.92
KB
-rw-r--r--
ImageOps.pyc
12.26
KB
-rw-r--r--
ImagePalette.py
6.25
KB
-rw-r--r--
ImagePalette.pyc
6.76
KB
-rw-r--r--
ImagePath.py
1.2
KB
-rw-r--r--
ImagePath.pyc
1.35
KB
-rw-r--r--
ImageQt.py
2.61
KB
-rw-r--r--
ImageQt.pyc
2.02
KB
-rw-r--r--
ImageSequence.py
939
B
-rw-r--r--
ImageSequence.pyc
1.19
KB
-rw-r--r--
ImageShow.py
4.67
KB
-rw-r--r--
ImageShow.pyc
5.36
KB
-rw-r--r--
ImageStat.py
3.74
KB
-rw-r--r--
ImageStat.pyc
4.53
KB
-rw-r--r--
ImageTransform.py
2.81
KB
-rw-r--r--
ImageTransform.pyc
1.85
KB
-rw-r--r--
ImageWin.py
7.49
KB
-rw-r--r--
ImageWin.pyc
9.69
KB
-rw-r--r--
ImtImagePlugin.py
2.17
KB
-rw-r--r--
ImtImagePlugin.pyc
1.56
KB
-rw-r--r--
IptcImagePlugin.py
6.8
KB
-rw-r--r--
IptcImagePlugin.pyc
5.76
KB
-rw-r--r--
Jpeg2KImagePlugin.py
7.57
KB
-rw-r--r--
Jpeg2KImagePlugin.pyc
6.49
KB
-rw-r--r--
JpegImagePlugin.py
24.43
KB
-rw-r--r--
JpegImagePlugin.pyc
19.47
KB
-rw-r--r--
JpegPresets.py
12.05
KB
-rw-r--r--
JpegPresets.pyc
6.3
KB
-rw-r--r--
McIdasImagePlugin.py
1.71
KB
-rw-r--r--
McIdasImagePlugin.pyc
1.66
KB
-rw-r--r--
MicImagePlugin.py
2.12
KB
-rw-r--r--
MicImagePlugin.pyc
2.08
KB
-rw-r--r--
MpegImagePlugin.py
1.77
KB
-rw-r--r--
MpegImagePlugin.pyc
2.47
KB
-rw-r--r--
MpoImagePlugin.py
2.73
KB
-rw-r--r--
MpoImagePlugin.pyc
2.48
KB
-rw-r--r--
MspImagePlugin.py
2.13
KB
-rw-r--r--
MspImagePlugin.pyc
2.38
KB
-rw-r--r--
OleFileIO-README.md
17.38
KB
-rw-r--r--
OleFileIO.py
87.39
KB
-rwxr-xr-x
OleFileIO.pyc
47.97
KB
-rw-r--r--
PSDraw.py
6.71
KB
-rw-r--r--
PSDraw.pyc
6.55
KB
-rw-r--r--
PaletteFile.py
1.08
KB
-rw-r--r--
PaletteFile.pyc
1.31
KB
-rw-r--r--
PalmImagePlugin.py
9.02
KB
-rw-r--r--
PalmImagePlugin.pyc
9.41
KB
-rw-r--r--
PcdImagePlugin.py
1.77
KB
-rw-r--r--
PcdImagePlugin.pyc
1.72
KB
-rw-r--r--
PcfFontFile.py
6.05
KB
-rw-r--r--
PcfFontFile.pyc
6.18
KB
-rw-r--r--
PcxImagePlugin.py
5.16
KB
-rw-r--r--
PcxImagePlugin.pyc
4.15
KB
-rw-r--r--
PdfImagePlugin.py
5.67
KB
-rw-r--r--
PdfImagePlugin.pyc
5.02
KB
-rw-r--r--
PixarImagePlugin.py
1.58
KB
-rw-r--r--
PixarImagePlugin.pyc
1.24
KB
-rw-r--r--
PngImagePlugin.py
22.14
KB
-rw-r--r--
PngImagePlugin.pyc
20.66
KB
-rw-r--r--
PpmImagePlugin.py
4.47
KB
-rw-r--r--
PpmImagePlugin.pyc
3.84
KB
-rw-r--r--
PsdImagePlugin.py
7.25
KB
-rw-r--r--
PsdImagePlugin.pyc
6.13
KB
-rw-r--r--
PyAccess.py
8.33
KB
-rw-r--r--
PyAccess.pyc
12.66
KB
-rw-r--r--
SgiImagePlugin.py
2.06
KB
-rw-r--r--
SgiImagePlugin.pyc
1.97
KB
-rw-r--r--
SpiderImagePlugin.py
8.99
KB
-rw-r--r--
SpiderImagePlugin.pyc
7.58
KB
-rw-r--r--
SunImagePlugin.py
1.9
KB
-rw-r--r--
SunImagePlugin.pyc
1.98
KB
-rw-r--r--
TarIO.py
1.19
KB
-rw-r--r--
TarIO.pyc
1.07
KB
-rw-r--r--
TgaImagePlugin.py
4.85
KB
-rw-r--r--
TgaImagePlugin.pyc
3.99
KB
-rw-r--r--
TiffImagePlugin.py
41.83
KB
-rw-r--r--
TiffImagePlugin.pyc
30.04
KB
-rw-r--r--
TiffTags.py
7.28
KB
-rw-r--r--
TiffTags.pyc
7.88
KB
-rw-r--r--
WalImageFile.py
5.41
KB
-rw-r--r--
WalImageFile.pyc
2.12
KB
-rw-r--r--
WebPImagePlugin.py
1.92
KB
-rw-r--r--
WebPImagePlugin.pyc
2.69
KB
-rw-r--r--
WmfImagePlugin.py
4.04
KB
-rw-r--r--
WmfImagePlugin.pyc
3.95
KB
-rw-r--r--
XVThumbImagePlugin.py
1.8
KB
-rw-r--r--
XVThumbImagePlugin.pyc
1.59
KB
-rw-r--r--
XbmImagePlugin.py
2.4
KB
-rw-r--r--
XbmImagePlugin.pyc
2.51
KB
-rw-r--r--
XpmImagePlugin.py
3.02
KB
-rw-r--r--
XpmImagePlugin.pyc
2.79
KB
-rw-r--r--
__init__.py
1.52
KB
-rw-r--r--
__init__.pyc
1.24
KB
-rw-r--r--
_binary.py
1.54
KB
-rw-r--r--
_binary.pyc
2.79
KB
-rw-r--r--
_imaging.x86_64-linux-gnu.so
308.97
KB
-rw-r--r--
_imagingcms.x86_64-linux-gnu.s...
16.02
KB
-rw-r--r--
_imagingft.x86_64-linux-gnu.so
20.64
KB
-rw-r--r--
_imagingmath.x86_64-linux-gnu....
18.17
KB
-rw-r--r--
_imagingmorph.x86_64-linux-gnu...
10.27
KB
-rw-r--r--
_util.py
553
B
-rw-r--r--
_util.pyc
1.58
KB
-rw-r--r--
_webp.x86_64-linux-gnu.so
10.35
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : GifImagePlugin.py
# # The Python Imaging Library. # $Id$ # # GIF file handling # # History: # 1995-09-01 fl Created # 1996-12-14 fl Added interlace support # 1996-12-30 fl Added animation support # 1997-01-05 fl Added write support, fixed local colour map bug # 1997-02-23 fl Make sure to load raster data in getdata() # 1997-07-05 fl Support external decoder (0.4) # 1998-07-09 fl Handle all modes when saving (0.5) # 1998-07-15 fl Renamed offset attribute to avoid name clash # 2001-04-16 fl Added rewind support (seek to frame 0) (0.6) # 2001-04-17 fl Added palette optimization (0.7) # 2002-06-06 fl Added transparency support for save (0.8) # 2004-02-24 fl Disable interlacing for small images # # Copyright (c) 1997-2004 by Secret Labs AB # Copyright (c) 1995-2004 by Fredrik Lundh # # See the README file for information on usage and redistribution. # __version__ = "0.9" from PIL import Image, ImageFile, ImagePalette, _binary # -------------------------------------------------------------------- # Helpers i8 = _binary.i8 i16 = _binary.i16le o8 = _binary.o8 o16 = _binary.o16le # -------------------------------------------------------------------- # Identify/read GIF files def _accept(prefix): return prefix[:6] in [b"GIF87a", b"GIF89a"] ## # Image plugin for GIF images. This plugin supports both GIF87 and # GIF89 images. class GifImageFile(ImageFile.ImageFile): format = "GIF" format_description = "Compuserve GIF" global_palette = None def data(self): s = self.fp.read(1) if s and i8(s): return self.fp.read(i8(s)) return None def _open(self): # Screen s = self.fp.read(13) if s[:6] not in [b"GIF87a", b"GIF89a"]: raise SyntaxError("not a GIF file") self.info["version"] = s[:6] self.size = i16(s[6:]), i16(s[8:]) self.tile = [] flags = i8(s[10]) bits = (flags & 7) + 1 if flags & 128: # get global palette self.info["background"] = i8(s[11]) # check if palette contains colour indices p = self.fp.read(3 << bits) for i in range(0, len(p), 3): if not (i//3 == i8(p[i]) == i8(p[i+1]) == i8(p[i+2])): p = ImagePalette.raw("RGB", p) self.global_palette = self.palette = p break self.__fp = self.fp # FIXME: hack self.__rewind = self.fp.tell() self.seek(0) # get ready to read first frame def seek(self, frame): if frame == 0: # rewind self.__offset = 0 self.dispose = None self.dispose_extent = [0, 0, 0, 0] # x0, y0, x1, y1 self.__frame = -1 self.__fp.seek(self.__rewind) self._prev_im = None self.disposal_method = 0 else: # ensure that the previous frame was loaded if not self.im: self.load() if frame != self.__frame + 1: raise ValueError("cannot seek to frame %d" % frame) self.__frame = frame self.tile = [] self.fp = self.__fp if self.__offset: # backup to last frame self.fp.seek(self.__offset) while self.data(): pass self.__offset = 0 if self.dispose: self.im.paste(self.dispose, self.dispose_extent) from copy import copy self.palette = copy(self.global_palette) while True: s = self.fp.read(1) if not s or s == b";": break elif s == b"!": # # extensions # s = self.fp.read(1) block = self.data() if i8(s) == 249: # # graphic control extension # flags = i8(block[0]) if flags & 1: self.info["transparency"] = i8(block[3]) self.info["duration"] = i16(block[1:3]) * 10 # disposal method - find the value of bits 4 - 6 dispose_bits = 0b00011100 & flags dispose_bits = dispose_bits >> 2 if dispose_bits: # only set the dispose if it is not # unspecified. I'm not sure if this is # correct, but it seems to prevent the last # frame from looking odd for some animations self.disposal_method = dispose_bits elif i8(s) == 255: # # application extension # self.info["extension"] = block, self.fp.tell() if block[:11] == b"NETSCAPE2.0": block = self.data() if len(block) >= 3 and i8(block[0]) == 1: self.info["loop"] = i16(block[1:3]) while self.data(): pass elif s == b",": # # local image # s = self.fp.read(9) # extent x0, y0 = i16(s[0:]), i16(s[2:]) x1, y1 = x0 + i16(s[4:]), y0 + i16(s[6:]) self.dispose_extent = x0, y0, x1, y1 flags = i8(s[8]) interlace = (flags & 64) != 0 if flags & 128: bits = (flags & 7) + 1 self.palette =\ ImagePalette.raw("RGB", self.fp.read(3 << bits)) # image data bits = i8(self.fp.read(1)) self.__offset = self.fp.tell() self.tile = [("gif", (x0, y0, x1, y1), self.__offset, (bits, interlace))] break else: pass # raise IOError, "illegal GIF tag `%x`" % i8(s) try: if self.disposal_method < 2: # do not dispose or none specified self.dispose = None elif self.disposal_method == 2: # replace with background colour self.dispose = Image.core.fill("P", self.size, self.info["background"]) else: # replace with previous contents if self.im: self.dispose = self.im.copy() # only dispose the extent in this frame if self.dispose: self.dispose = self.dispose.crop(self.dispose_extent) except (AttributeError, KeyError): pass if not self.tile: # self.__fp = None raise EOFError("no more images in GIF file") self.mode = "L" if self.palette: self.mode = "P" def tell(self): return self.__frame def load_end(self): ImageFile.ImageFile.load_end(self) # if the disposal method is 'do not dispose', transparent # pixels should show the content of the previous frame if self._prev_im and self.disposal_method == 1: # we do this by pasting the updated area onto the previous # frame which we then use as the current image content updated = self.im.crop(self.dispose_extent) self._prev_im.paste(updated, self.dispose_extent, updated.convert('RGBA')) self.im = self._prev_im self._prev_im = self.im.copy() # -------------------------------------------------------------------- # Write GIF files try: import _imaging_gif except ImportError: _imaging_gif = None RAWMODE = { "1": "L", "L": "L", "P": "P", } def _save(im, fp, filename): if _imaging_gif: # call external driver try: _imaging_gif.save(im, fp, filename) return except IOError: pass # write uncompressed file if im.mode in RAWMODE: imOut = im else: # convert on the fly (EXPERIMENTAL -- I'm not sure PIL # should automatically convert images on save...) if Image.getmodebase(im.mode) == "RGB": palette_size = 256 if im.palette: palette_size = len(im.palette.getdata()[1]) // 3 imOut = im.convert("P", palette=1, colors=palette_size) else: imOut = im.convert("L") # header try: palette = im.encoderinfo["palette"] except KeyError: palette = None im.encoderinfo["optimize"] = im.encoderinfo.get("optimize", True) header, usedPaletteColors = getheader(imOut, palette, im.encoderinfo) for s in header: fp.write(s) flags = 0 try: interlace = im.encoderinfo["interlace"] except KeyError: interlace = 1 # workaround for @PIL153 if min(im.size) < 16: interlace = 0 if interlace: flags = flags | 64 try: transparency = im.encoderinfo["transparency"] except KeyError: pass else: transparency = int(transparency) # optimize the block away if transparent color is not used transparentColorExists = True # adjust the transparency index after optimize if usedPaletteColors is not None and len(usedPaletteColors) < 256: for i in range(len(usedPaletteColors)): if usedPaletteColors[i] == transparency: transparency = i transparentColorExists = True break else: transparentColorExists = False # transparency extension block if transparentColorExists: fp.write(b"!" + o8(249) + # extension intro o8(4) + # length o8(1) + # transparency info present o16(0) + # duration o8(transparency) # transparency index + o8(0)) # local image header fp.write(b"," + o16(0) + o16(0) + # bounding box o16(im.size[0]) + # size o16(im.size[1]) + o8(flags) + # flags o8(8)) # bits imOut.encoderconfig = (8, interlace) ImageFile._save(imOut, fp, [("gif", (0, 0)+im.size, 0, RAWMODE[imOut.mode])]) fp.write(b"\0") # end of image data fp.write(b";") # end of file try: fp.flush() except: pass def _save_netpbm(im, fp, filename): # # If you need real GIF compression and/or RGB quantization, you # can use the external NETPBM/PBMPLUS utilities. See comments # below for information on how to enable this. import os from subprocess import Popen, check_call, PIPE, CalledProcessError import tempfile file = im._dump() if im.mode != "RGB": with open(filename, 'wb') as f: stderr = tempfile.TemporaryFile() check_call(["ppmtogif", file], stdout=f, stderr=stderr) else: with open(filename, 'wb') as f: # Pipe ppmquant output into ppmtogif # "ppmquant 256 %s | ppmtogif > %s" % (file, filename) quant_cmd = ["ppmquant", "256", file] togif_cmd = ["ppmtogif"] stderr = tempfile.TemporaryFile() quant_proc = Popen(quant_cmd, stdout=PIPE, stderr=stderr) stderr = tempfile.TemporaryFile() togif_proc = Popen(togif_cmd, stdin=quant_proc.stdout, stdout=f, stderr=stderr) # Allow ppmquant to receive SIGPIPE if ppmtogif exits quant_proc.stdout.close() retcode = quant_proc.wait() if retcode: raise CalledProcessError(retcode, quant_cmd) retcode = togif_proc.wait() if retcode: raise CalledProcessError(retcode, togif_cmd) try: os.unlink(file) except: pass # -------------------------------------------------------------------- # GIF utilities def getheader(im, palette=None, info=None): """Return a list of strings representing a GIF header""" optimize = info and info.get("optimize", 0) # Header Block # http://www.matthewflickinger.com/lab/whatsinagif/bits_and_bytes.asp header = [ b"GIF87a" + # signature + version o16(im.size[0]) + # canvas width o16(im.size[1]) # canvas height ] if im.mode == "P": if palette and isinstance(palette, bytes): sourcePalette = palette[:768] else: sourcePalette = im.im.getpalette("RGB")[:768] else: # L-mode if palette and isinstance(palette, bytes): sourcePalette = palette[:768] else: sourcePalette = bytearray([i//3 for i in range(768)]) usedPaletteColors = paletteBytes = None if optimize: usedPaletteColors = [] # check which colors are used i = 0 for count in im.histogram(): if count: usedPaletteColors.append(i) i += 1 # create the new palette if not every color is used if len(usedPaletteColors) < 256: paletteBytes = b"" newPositions = {} i = 0 # pick only the used colors from the palette for oldPosition in usedPaletteColors: paletteBytes += sourcePalette[oldPosition*3:oldPosition*3+3] newPositions[oldPosition] = i i += 1 # replace the palette color id of all pixel with the new id imageBytes = bytearray(im.tobytes()) for i in range(len(imageBytes)): imageBytes[i] = newPositions[imageBytes[i]] im.frombytes(bytes(imageBytes)) newPaletteBytes = (paletteBytes + (768 - len(paletteBytes)) * b'\x00') im.putpalette(newPaletteBytes) im.palette = ImagePalette.ImagePalette("RGB", palette=paletteBytes, size=len(paletteBytes)) if not paletteBytes: paletteBytes = sourcePalette # Logical Screen Descriptor # calculate the palette size for the header import math colorTableSize = int(math.ceil(math.log(len(paletteBytes)//3, 2)))-1 if colorTableSize < 0: colorTableSize = 0 # size of global color table + global color table flag header.append(o8(colorTableSize + 128)) # background + reserved/aspect header.append(o8(0) + o8(0)) # end of Logical Screen Descriptor # add the missing amount of bytes # the palette has to be 2<<n in size actualTargetSizeDiff = (2 << colorTableSize) - len(paletteBytes)//3 if actualTargetSizeDiff > 0: paletteBytes += o8(0) * 3 * actualTargetSizeDiff # Header + Logical Screen Descriptor + Global Color Table header.append(paletteBytes) return header, usedPaletteColors 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 # -------------------------------------------------------------------- # Registry Image.register_open(GifImageFile.format, GifImageFile, _accept) Image.register_save(GifImageFile.format, _save) Image.register_extension(GifImageFile.format, ".gif") Image.register_mime(GifImageFile.format, "image/gif") # # Uncomment the following line if you wish to use NETPBM/PBMPLUS # instead of the built-in "uncompressed" GIF encoder # Image.register_save(GifImageFile.format, _save_netpbm)
Close