replaced usleep() by rstime::rs_usleep() which accepts times >= 1 sec. Should fix problems on windows

This commit is contained in:
csoler 2018-01-27 20:22:31 +01:00
parent c1fccef53b
commit d0039241d3
28 changed files with 134 additions and 100 deletions

View file

@ -1,6 +1,6 @@
#include "imageutil.h"
#include "util/misc.h"
#include "util/rsscopetimer.h"
#include "util/rstime.h"
#include <QApplication>
#include <QByteArray>
@ -113,7 +113,7 @@ bool ImageUtil::optimizeSize(QString &html, const QImage& original, QImage &opti
int ImageUtil::checkSize(QString &embeddedImage, const QImage &img, int maxBytes)
{
RsScopeTimer st("Check size");
rstime::RsScopeTimer st("Check size");
QByteArray bytearray;
QBuffer buffer(&bytearray);
@ -166,7 +166,7 @@ void ImageUtil::quantization(const QImage &img, QVector<QRgb> &palette)
int bits = 4; // bits/pixel
int samplesize = 100000; //only take this many color samples
RsScopeTimer st("Quantization");
rstime::RsScopeTimer st("Quantization");
QSet<QRgb> colors;
//collect color information