def x_apic(self):
        data = self.rawdata
        self.encoding = encodings[ord(data[0])]
        self.mimetype = ''
        self.desc = ''
        self.pict = ''
        self.picttype = 0

        # get mime type (must be latin-1)
        imgtype = data[1:4]
        if not imgtype:
            raise ID3FrameException("APIC extraction failed. Missing mimetype")

        if imgtype not in ID3V2_2_FRAME_IMAGE_FORMAT_TO_MIME_TYPE.keys():
            raise ID3FrameException("Unrecognised mime-type")            
        else:
            self.mimetype = ID3V2_2_FRAME_IMAGE_FORMAT_TO_MIME_TYPE[imgtype]

        picttype = ord(data[len(imgtype) + 1])

        # get picture description
        for i in range(len(imgtype) + 2, len(data) - 1):
            print [data[i:i+3]]
            if data[i] == '\x00':
                self.desc = data[len(imgtype)+2:i]
                if data[i+1] == '\x00':
                    self.pict = data[i+2:]
                else:
                    self.pict = data[i+1:]
                break
                    
        debug('Read Field: %s Len: %d PicType: %d Mime: %s Desc: %s PicLen: %d' % 
               (self.fid, self.length, self.picttype, self.mimetype,
                self.desc, len(self.pict)))
        
        # open("test.png","w").write(pictdata)
Decorate a ProtoRPC Service class for use by the framework above.
dataset/ETHPy150Open Ciantic/pytagger/tagger/id3v2frame.py/ID3v2_2_Frame.x_apic--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/endpoints/api_config.py/api