- got rid of libMagick++ dependency

This commit is contained in:
Christophe Dumez 2008-11-04 22:39:43 +00:00
parent 3164337c3c
commit 2aea2a0032
10 changed files with 677 additions and 252 deletions

View file

@ -38,11 +38,6 @@
#include "misc.h"
#include "downloadThread.h"
#ifdef HAVE_MAGICK
#include <Magick++.h>
using namespace Magick;
#endif
class RssManager;
class RssStream;
class RssItem;
@ -588,20 +583,6 @@ class RssManager : public QObject{
if(url.endsWith("favicon.ico")){
// Icon downloaded
QImage fileIcon;
#ifdef HAVE_MAGICK
try{
QFile::copy(path, path+".ico");
Image image(QDir::cleanPath(path+".ico").toUtf8().data());
// Convert to PNG since we can't read ICO format
image.magick("PNG");
// Resize to 16x16px
image.sample(Geometry(16, 16));
image.write(path.toUtf8().data());
QFile::remove(path+".ico");
}catch(Magick::Exception &error_){
qDebug("favicon conversion to PNG failure: %s", error_.what());
}
#endif
if(fileIcon.load(path)) {
QList<RssStream*> res = findFeedsWithIcon(url);
RssStream* stream;