'This function uses the self.image_hrefs dictionary mapping. It is populated by the dump_text function.'

def fb2mlize_images(self):

    from calibre.ebooks.oeb.base import OEB_RASTER_IMAGES
    images = []
    for item in self.oeb_book.manifest:
        if (item.href not in self.image_hrefs):
            continue
        if (item.media_type in OEB_RASTER_IMAGES):
            try:
                if (item.media_type != 'image/jpeg'):
                    imdata = save_cover_data_to(item.data, compression_quality=70)
                    raw_data = b64encode(imdata)
                else:
                    raw_data = b64encode(item.data)
                data = ''
                col = 1
                for char in raw_data:
                    if (col == 72):
                        data += '\n'
                        col = 1
                    col += 1
                    data += char
                images.append(('<binary    id="%s"    content-type="image/jpeg">%s\n</binary>' % (self.image_hrefs[item.href], data)))
            except Exception as e:
                self.log.error(('Error:    Could    not    include    file    %s    because    %s.' % (item.href, e)))
    return ''.join(images)
