def make_cypherseed(self, img, rawnoise, calibration=False, is_seed=True):
    img = img.convertToFormat(QImage.Format_Mono)
    p = QPainter()
    p.begin(img)
    p.setCompositionMode(26)
    p.drawImage(0, 0, rawnoise)
    p.end()
    cypherseed = self.pixelcode_2x2(img)
    cypherseed = QBitmap.fromImage(cypherseed)
    cypherseed = cypherseed.scaled(self.f_size, Qt.KeepAspectRatio)
    cypherseed = self.overlay_marks(cypherseed, True, calibration)
    if (not is_seed):
        self.filename_prefix = 'custom_secret_'
        self.was = _('Custom secret')
    else:
        self.filename_prefix = (self.wallet_name + '_seed_')
        self.was = ((self.wallet_name + ' ') + _('seed'))
        if self.extension:
            self.ext_warning(self.c_dialog)
    if (not calibration):
        self.toPdf(QImage(cypherseed))
        QDesktopServices.openUrl(QUrl.fromLocalFile(self.get_path_to_revealer_file('.pdf')))
        cypherseed.save(self.get_path_to_revealer_file('.png'))
        self.bcrypt(self.c_dialog)
    return cypherseed
def make_cypherseed(self, img, rawnoise, calibration=False, is_seed=True):
    img = img.convertToFormat(QImage.Format_Mono)
    p = QPainter()
    p.begin(img)
    p.setCompositionMode(26)
    p.drawImage(0, 0, rawnoise)
    p.end()
    cypherseed = self.pixelcode_2x2(img)
    cypherseed = QBitmap.fromImage(cypherseed)
    cypherseed = cypherseed.scaled(self.f_size, Qt.KeepAspectRatio)
    cypherseed = self.overlay_marks(cypherseed, True, calibration)
    if (not is_seed):
        self.filename_prefix = 'custom_secret_'
        self.was = _('Custom secret')
    else:
        self.filename_prefix = (self.wallet_name + '_seed_')
        self.was = ((self.wallet_name + ' ') + _('seed'))
        if self.extension:
            self.ext_warning(self.c_dialog)
    if (not calibration):
        self.toPdf(QImage(cypherseed))
        QDesktopServices.openUrl(QUrl.fromLocalFile(self.get_path_to_revealer_file('.pdf')))
        cypherseed.save(self.get_path_to_revealer_file('.png'))
        self.bcrypt(self.c_dialog)
    return cypherseed