aboutsummaryrefslogtreecommitdiff
path: root/src/script/common/c_converter.h
diff options
context:
space:
mode:
authorJuozas <juozaspo@gmail.com>2018-12-03 20:31:20 +0200
committerSmallJoker <SmallJoker@users.noreply.github.com>2018-12-03 19:31:20 +0100
commit94f2d99142946aca6481ee032ffc933ca6f0763d (patch)
treecd57de6fdcd6f2e3e6f9696d042778c4ac760879 /src/script/common/c_converter.h
parenta7025c72730adcd41648613cdad93f4e6507c3b4 (diff)
downloadminetest-94f2d99142946aca6481ee032ffc933ca6f0763d.tar.gz
minetest-94f2d99142946aca6481ee032ffc933ca6f0763d.tar.bz2
minetest-94f2d99142946aca6481ee032ffc933ca6f0763d.zip
Fix Android build errors (caused by 5f1cd55)
After commit 5f1cd55 touchscreengui.* files were pointing to old file locations
Diffstat (limited to 'src/script/common/c_converter.h')
0 files changed, 0 insertions, 0 deletions
n134'>134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
/*
Copyright (C) 2015 Aaron Suen <warr1024@gmail.com>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "imagefilters.h"
#include "util/numeric.h"
#include <math.h>

/* Fill in RGB values for transparent pixels, to correct for odd colors
 * appearing at borders when blending.  This is because many PNG optimizers
 * like to discard RGB values of transparent pixels, but when blending then
 * with non-transparent neighbors, their RGB values will shpw up nonetheless.
 *
 * This function modifies the original image in-place.
 *
 * Parameter "threshold" is the alpha level below which pixels are considered
 * transparent.  Should be 127 for 3d where alpha is threshold, but 0 for
 * 2d where alpha is blended.
 */
void imageCleanTransparent(video::IImage *src, u32 threshold)
{