mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 21:14:33 -04:00
Fixed YACReader compilation under Qt5 (YACReader-YACReaderLibrary communication is broken at runtime)
This commit is contained in:
@ -4,6 +4,8 @@
|
||||
#include <algorithm>
|
||||
#include <QByteArray>
|
||||
#include <QPixmap>
|
||||
#include <QApplication>
|
||||
#include <QImage>
|
||||
|
||||
#include <typeinfo>
|
||||
|
||||
@ -48,7 +50,7 @@ QImage changeImage( const QImage& image, int value )
|
||||
{
|
||||
QImage im = image;
|
||||
im.detach();
|
||||
if( im.numColors() == 0 ) /* truecolor */
|
||||
if( im.colorCount() == 0 ) /* truecolor */
|
||||
{
|
||||
if( im.format() != QImage::Format_RGB32 ) /* just in case */
|
||||
im = im.convertToFormat( QImage::Format_RGB32 );
|
||||
@ -93,7 +95,7 @@ QImage changeImage( const QImage& image, int value )
|
||||
{
|
||||
QVector<QRgb> colors = im.colorTable();
|
||||
for( int i = 0;
|
||||
i < im.numColors();
|
||||
i < im.colorCount();
|
||||
++i )
|
||||
colors[ i ] = qRgb( operation( qRed( colors[ i ] ), value ),
|
||||
operation( qGreen( colors[ i ] ), value ),
|
||||
@ -1081,4 +1083,4 @@ void Render::updateFilters(int brightness, int contrast, int gamma)
|
||||
}
|
||||
|
||||
reload();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user