Copyright (C) 2016 The Qt Company Ltd.
Contact: https://www.qt.io/licensing/
This file is part of the QtGui module of the Qt Toolkit.
$QT_BEGIN_LICENSE:LGPL$
Commercial License Usage
Licensees holding valid commercial Qt licenses may use this file in accordance with the commercial license agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and The Qt Company. For licensing terms and conditions see https://www.qt.io/terms-conditions. For further information use the contact form at https://www.qt.io/contact-us.
GNU Lesser General Public License Usage
Alternatively, this file may be used under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation and appearing in the file LICENSE.LGPL3 included in the packaging of this file. Please review the following information to ensure the GNU Lesser General Public License version 3 requirements will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
GNU General Public License Usage
Alternatively, this file may be used under the terms of the GNU General Public License version 2.0 or (at your option) the GNU General Public license version 3 or any later version approved by the KDE Free Qt Foundation. The licenses are as published by the Free Software Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 included in the packaging of this file. Please review the following information to ensure the GNU General Public License requirements will be met: https://www.gnu.org/licenses/gpl-2.0.html and https://www.gnu.org/licenses/gpl-3.0.html.
$QT_END_LICENSE$
Copyright (C) 2004, 2005 Daniel M. Duley
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
OTHER CREDITS:
This is the normal smoothscale method, based on Imlib2's smoothscale.
Originally I took the algorithm used in NetPBM and Qt and added MMX/3dnow optimizations. It ran in about 1/2 the time as Qt. Then I ported Imlib's C algorithm and it ran at about the same speed as my MMX optimized one... Finally I ported Imlib's MMX version and it ran in less than half the time as my MMX algorithm, (taking only a quarter of the time Qt does). After further optimization it seems to run at around 1/6th.
Changes include formatting, namespaces and other C++'ings, removal of old #ifdef'ed code, and removal of unneeded border calculation code. Later the code has been refactored, an SSE4.1 optimizated path have been added instead of the removed MMX assembler, and scaling of clipped area removed, and an RGBA64 version written
Imlib2 is (C) Carsten Haitzler and various contributors. The MMX code is by Willem Monsuwe <willem@stack.nl>. All other modifications are (C) Daniel M. Duley.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies of the Software and its Copyright notices. In addition publicly documented acknowledgment must be given that this software has been used if no source code of this software is made available publicly. Making the source available publicly means including the source for this software with the distribution, or a method to get this software via some reasonable mechanism (electronic transfer via a network or media) as well as making an offer to supply the source on request. This Copyright notice serves as an offer to supply the source on on request as well. Instead of this, supplying acknowledgments of use of this software in either Copyright notices, Manuals, Publicity and Marketing documents or any documentation provided with any product containing this software. This License does not apply to any software that links to the libraries provided by this software (statically or dynamically), but only to the software provided.
Please see the COPYING-PLAIN for a plain-english explanation of this notice and its intent.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.