|
Quantum GIS API Documentation
master-ce49b66
|
00001 /*************************************************************************** 00002 qgsbilinearrasterresampler.cpp 00003 ------------------------------ 00004 begin : December 2011 00005 copyright : (C) 2011 by Marco Hugentobler 00006 email : marco at sourcepole dot ch 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #include "qgsbilinearrasterresampler.h" 00019 #include <QImage> 00020 #include <cmath> 00021 00022 QgsBilinearRasterResampler::QgsBilinearRasterResampler() 00023 { 00024 } 00025 00026 QgsBilinearRasterResampler::~QgsBilinearRasterResampler() 00027 { 00028 } 00029 00030 QgsRasterResampler * QgsBilinearRasterResampler::clone() const 00031 { 00032 return new QgsBilinearRasterResampler(); 00033 } 00034 00035 void QgsBilinearRasterResampler::resample( const QImage& srcImage, QImage& dstImage ) 00036 { 00037 dstImage = srcImage.scaled( dstImage.width(), dstImage.height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation ); 00038 }