Server IP : 195.201.23.43 / Your IP : 18.225.98.59 Web Server : Apache System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64 User : kdecoratie ( 1041) PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/PIL/ |
Upload File : |
# # The Python Imaging Library. # $Id$ # # Binary input/output support routines. # # Copyright (c) 1997-2003 by Secret Labs AB # Copyright (c) 1995-2003 by Fredrik Lundh # Copyright (c) 2012 by Brian Crowell # # See the README file for information on usage and redistribution. # from struct import pack, unpack_from def i8(c): return c if c.__class__ is int else c[0] def o8(i): return bytes((i & 255,)) # Input, le = little endian, be = big endian def i16le(c, o=0): """ Converts a 2-bytes (16 bits) string to an unsigned integer. :param c: string containing bytes to convert :param o: offset of bytes to convert in string """ return unpack_from("<H", c, o)[0] def si16le(c, o=0): """ Converts a 2-bytes (16 bits) string to a signed integer. :param c: string containing bytes to convert :param o: offset of bytes to convert in string """ return unpack_from("<h", c, o)[0] def i32le(c, o=0): """ Converts a 4-bytes (32 bits) string to an unsigned integer. :param c: string containing bytes to convert :param o: offset of bytes to convert in string """ return unpack_from("<I", c, o)[0] def si32le(c, o=0): """ Converts a 4-bytes (32 bits) string to a signed integer. :param c: string containing bytes to convert :param o: offset of bytes to convert in string """ return unpack_from("<i", c, o)[0] def i16be(c, o=0): return unpack_from(">H", c, o)[0] def i32be(c, o=0): return unpack_from(">I", c, o)[0] # Output, le = little endian, be = big endian def o16le(i): return pack("<H", i) def o32le(i): return pack("<I", i) def o16be(i): return pack(">H", i) def o32be(i): return pack(">I", i)Private