示例#1
0
void PixmapEditor::setValue(const QImage &aValue)
{
    mValue=QPixmap::fromImage(aValue);

    ui->valueEdit->setText(imageToString(aValue));
    setIcon(iconForPixmap(mValue));

    mDataType=IMAGE;
}
示例#2
0
int CTextExtractor::imageToJson(const string &imgSrc, string &ret) {
	vector<TextPatch> txt;
	vector<int> pos;
	map<string, string> mp;
	set<string> st;
	int i, avg = imageToString(imgSrc, txt);
	
	if (avg == -1) return -1;
	
	mp.clear(); st.clear();
	for (i = 0; i < txt.size(); ++i) {
		strProc(txt[i].X, mp, st);
	}
	dataToJson(mp, st, ret);

	return avg;
}