282 }
283
284 break;
285
286 default:
287 /* nothing to do for other edge types. */
288 break;
289 }
290
291 if (param_e->buff_malloc != NULL)
292 mlib_free(param_e->buff_malloc);
293 }
294
295 if (param->buff_malloc != NULL)
296 mlib_free(param->buff_malloc);
297
298 return res;
299 }
300
301 /***************************************************************/
302 mlib_status mlib_ImageAffine(mlib_image *dst,
303 const mlib_image *src,
304 const mlib_d64 *mtx,
305 mlib_filter filter,
306 mlib_edge edge)
307 {
308 mlib_type type;
309
310 MLIB_IMAGE_CHECK(src);
311 MLIB_IMAGE_CHECK(dst);
312
313 type = mlib_ImageGetType(dst);
314
315 if (type != MLIB_BIT && type != MLIB_BYTE &&
316 type != MLIB_SHORT && type != MLIB_USHORT && type != MLIB_INT) {
317 return MLIB_FAILURE;
318 }
319
320 return mlib_ImageAffine_alltypes(dst, src, mtx, filter, edge);
321 }
322
|
282 }
283
284 break;
285
286 default:
287 /* nothing to do for other edge types. */
288 break;
289 }
290
291 if (param_e->buff_malloc != NULL)
292 mlib_free(param_e->buff_malloc);
293 }
294
295 if (param->buff_malloc != NULL)
296 mlib_free(param->buff_malloc);
297
298 return res;
299 }
300
301 /***************************************************************/
302 JNIEXPORT mlib_status JNICALL mlib_ImageAffine(mlib_image *dst,
303 const mlib_image *src,
304 const mlib_d64 *mtx,
305 mlib_filter filter,
306 mlib_edge edge)
307 {
308 mlib_type type;
309
310 MLIB_IMAGE_CHECK(src);
311 MLIB_IMAGE_CHECK(dst);
312
313 type = mlib_ImageGetType(dst);
314
315 if (type != MLIB_BIT && type != MLIB_BYTE &&
316 type != MLIB_SHORT && type != MLIB_USHORT && type != MLIB_INT) {
317 return MLIB_FAILURE;
318 }
319
320 return mlib_ImageAffine_alltypes(dst, src, mtx, filter, edge);
321 }
322
|