![]() ![]() _save ( im, fp, ) # ALTERNATIVE: save via builtin debug function # im._dump(filename) # - Image. write ( b "255 \n " ) elif rawmode = "I 16B" : fp. write ( b "255 \n " ) if head = b "P5" : if rawmode = "L" : fp. Works with popular operating systems, including Linux and Windows 8. ![]() Automatically updates its security settings for extra safety. Improves graphics on most video sharing sites. encode ( "ascii" )) if head = b "P6" : fp. Download the plugin to experience the internet like never before. read ( 1 ) if s != b "P" : raise Syntaćrror ( "not a PPM file" ) magic_number = self. read ( 1 ) if not c or c in b_whitespace : break if c > b " \x79 " : raise ValueError ( "Expected ASCII value, found binary" ) s = s + c if len ( s ) > 9 : raise ValueError ( "Expected int, got > 9 digits" ) return s def _open ( self ): # check magic s = self. ImageFile ): format = "PPM" format_description = "Pbmplus image" def _token ( self, s = b "" ): while True : # read until next whitespace c = self.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |