Use SRGB setting in ppm2pwg
image->sRGB PDF->RGB
This commit is contained in:
parent
a8f904d234
commit
f42dbf4484
1 changed files with 4 additions and 3 deletions
|
@ -6,7 +6,7 @@
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
|
||||||
void ppm2PwgEnv(QStringList& env, bool urf, quint32 Quality, QString PaperSize,
|
void ppm2PwgEnv(QStringList& env, bool urf, quint32 Quality, QString PaperSize,
|
||||||
quint32 HwResX, quint32 HwResY, bool TwoSided, bool Tumble, quint32 pages)
|
quint32 HwResX, quint32 HwResY, bool TwoSided, bool Tumble, bool srgb, quint32 pages)
|
||||||
{
|
{
|
||||||
env.append("HWRES_X="+QString::number(HwResX));
|
env.append("HWRES_X="+QString::number(HwResX));
|
||||||
env.append("HWRES_Y="+QString::number(HwResY));
|
env.append("HWRES_Y="+QString::number(HwResY));
|
||||||
|
@ -28,6 +28,7 @@ void ppm2PwgEnv(QStringList& env, bool urf, quint32 Quality, QString PaperSize,
|
||||||
|
|
||||||
env.append("DUPLEX="+QString::number(TwoSided));
|
env.append("DUPLEX="+QString::number(TwoSided));
|
||||||
env.append("TUMBLE="+QString::number(Tumble));
|
env.append("TUMBLE="+QString::number(Tumble));
|
||||||
|
env.append("SRGB="+QString::number(srgb));
|
||||||
|
|
||||||
if(pages != 0)
|
if(pages != 0)
|
||||||
{
|
{
|
||||||
|
@ -181,7 +182,7 @@ void ConvertWorker::convertPdf(QNetworkRequest request, QString filename, QTempo
|
||||||
ppm2pwg->setArguments({"ppm2pwg"});
|
ppm2pwg->setArguments({"ppm2pwg"});
|
||||||
|
|
||||||
QStringList env;
|
QStringList env;
|
||||||
ppm2PwgEnv(env, urf, Quality, PaperSize, HwResX, HwResY, TwoSided, Tumble, pages);
|
ppm2PwgEnv(env, urf, Quality, PaperSize, HwResX, HwResY, TwoSided, Tumble, false, pages);
|
||||||
qDebug() << "ppm2pwg env is " << env;
|
qDebug() << "ppm2pwg env is " << env;
|
||||||
|
|
||||||
ppm2pwg->setEnvironment(env);
|
ppm2pwg->setEnvironment(env);
|
||||||
|
@ -336,7 +337,7 @@ void ConvertWorker::convertImage(QNetworkRequest request, QString filename, QTem
|
||||||
ppm2pwg->setArguments({"ppm2pwg"});
|
ppm2pwg->setArguments({"ppm2pwg"});
|
||||||
|
|
||||||
QStringList env;
|
QStringList env;
|
||||||
ppm2PwgEnv(env, urf, Quality, PaperSize, HwResX, HwResY, false, false, 0);
|
ppm2PwgEnv(env, urf, Quality, PaperSize, HwResX, HwResY, false, false, true, 0);
|
||||||
qDebug() << "ppm2pwg env is " << env;
|
qDebug() << "ppm2pwg env is " << env;
|
||||||
|
|
||||||
ppm2pwg->setEnvironment(env);
|
ppm2pwg->setEnvironment(env);
|
||||||
|
|
Loading…
Reference in a new issue