00001 /* 00002 * This file is part of the Scale2x project. 00003 * 00004 * Copyright (C) 2003 Andrea Mazzoleni 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00019 */ 00020 00021 /* 00022 * This file contains an example implementation of the Scale effect 00023 * applyed to a generic bitmap. 00024 * 00025 * You can find an high level description of the effect at : 00026 * 00027 * http://scale2x.sourceforge.net/ 00028 * 00029 * Alternatively at the previous license terms, you are allowed to use this 00030 * code in your program with these conditions: 00031 * - the program is not used in commercial activities. 00032 * - the whole source code of the program is released with the binary. 00033 * - derivative works of the program are allowed. 00034 */ 00035 00036 #ifndef __SCALEBIT_H 00037 #define __SCALEBIT_H 00038 00039 int scale_precondition(unsigned scale, unsigned pixel, unsigned width, unsigned height); 00040 void scale(unsigned scale, void* void_dst, unsigned dst_slice, const void* void_src, unsigned src_slice, unsigned pixel, unsigned width, unsigned height); 00041 00042 #endif 00043