/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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 General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* FUNCTION
* mlib_ImageCopy - Direct copy from one image to another.
*
* SYNOPSIS
* mlib_status mlib_ImageCopy(mlib_image *dst,
* mlib_image *src);
*
* ARGUMENT
* dst pointer to output or destination image
* src pointer to input or source image
*
* RESTRICTION
* src and dst must have the same size, type and number of channels.
* They can have 1, 2, 3 or 4 channels of MLIB_BIT, MLIB_BYTE,
* MLIB_SHORT, MLIB_INT, MLIB_FLOAT or MLIB_DOUBLE data type.
*
* DESCRIPTION
* Direct copy from one image to another.
*/
#include <stdlib.h>
#include "mlib_image.h"
#include "mlib_ImageCheck.h"
/***************************************************************/
/***************************************************************/
#ifdef MLIB_TEST
#else
#endif
{
mlib_s32 j; /* indices for x, y */
switch (mlib_ImageGetType(dst)) {
case MLIB_BIT:
if (!mlib_ImageIsNotOneDvector(src) &&
if ((size & 0x3f) == 0 &&
return MLIB_SUCCESS;
}
}
else {
}
}
else {
for (j = 0; j < height; j++) {
}
} else {
for (j = 0; j < height; j++) {
}
}
}
return MLIB_SUCCESS;
case MLIB_BYTE:
break;
case MLIB_SHORT:
width *= 2;
break;
case MLIB_INT:
case MLIB_FLOAT:
width *= 4;
break;
case MLIB_DOUBLE:
width *= 8;
break;
default:
return MLIB_FAILURE;
}
if (!mlib_ImageIsNotOneDvector(src) &&
if ((size & 0x3f) == 0 &&
return MLIB_SUCCESS;
}
}
else {
}
}
else {
/* row loop */
for (j = 0; j < height; j++) {
}
}
return MLIB_SUCCESS;
}
/***************************************************************/