博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
rga 格式转换到buffer指定位置
阅读量:4158 次
发布时间:2019-05-26

本文共 1524 字,大约阅读时间需要 5 分钟。

#define imcvtcolorEX(src, dst, sfmt, dfmt, nposX,nposY, ...) \    ({ \        IM_STATUS ret = IM_STATUS_SUCCESS; \        int args[] = {__VA_ARGS__}; \        int argc = sizeof(args)/sizeof(int); \        if (argc == 0) { \            ret = imcvtcolorEX_t(src, dst, sfmt, dfmt, nposX,nposY,IM_COLOR_SPACE_DEFAULT, 1); \        } else if (argc == 1){ \            ret = imcvtcolorEX_t(src, dst, sfmt, dfmt, nposX,nposY, args[0], 1); \        } else if (argc == 2){ \            ret = imcvtcolorEX_t(src, dst, sfmt, dfmt, nposX,nposY, args[0], args[1]); \        } else { \            ret = IM_STATUS_INVALID_PARAM; \            printf("invalid parameter\n"); \        } \        ret; \    })IM_API IM_STATUS imcvtcolorEX_t(rga_buffer_t src, rga_buffer_t dst, int sfmt, int dfmt, int nposX,int nposY, int mode, int sync);
IM_API IM_STATUS imcvtcolorEX_t(rga_buffer_t src, rga_buffer_t dst, int sfmt, int dfmt, int nposX,int nposY, int mode, int sync){    int usage = 0;    IM_STATUS ret = IM_STATUS_NOERROR;    rga_buffer_t pat;    im_rect srect;    im_rect drect;    im_rect prect;    empty_structure(NULL, NULL, &pat, &srect, &drect, &prect);    src.format = sfmt;    dst.format = dfmt;    dst.color_space_mode = mode;    if (sync == 0)        usage |= IM_SYNC;	srect.x = 0 ;    srect.y = 0;	srect.width = src.width ;    srect.height = src.height;    drect.x = nposX;    drect.y = nposY;    drect.width = dst.width;    drect.height = dst.height;    ret = improcess(src, dst, pat, srect, drect, prect, usage);    return ret;}

 

转载地址:http://vxbxi.baihongyu.com/

你可能感兴趣的文章
腾讯的一道面试题—不用除法求数字乘积
查看>>
素数算法
查看>>
java多线程环境单例模式实现详解
查看>>
将一个数插入到有序的数列中,插入后的数列仍然有序
查看>>
在有序的数列中查找某数,若该数在此数列中,则输出它所在的位置,否则输出no found
查看>>
阿里p8程序员四年提交6000次代码的确有功,但一次错误让人唏嘘!
查看>>
一道技术问题引起的遐想,最后得出结论技术的本质是多么的朴实!
查看>>
985硕士:非科班自学编程感觉还不如培训班出来的,硕士白读了?
查看>>
码农:和产品对一天需求,产品经理的需求是对完了,可我代码呢?
查看>>
第六章 背包问题——01背包
查看>>
1136 . 欧拉函数
查看>>
面试题:强制类型转换
查看>>
Decorator模式
查看>>
Template模式
查看>>
Observer模式
查看>>
高性能服务器设计
查看>>
图文介绍openLDAP在windows上的安装配置
查看>>
Pentaho BI开源报表系统
查看>>
Pentaho 开发: 在eclipse中构建Pentaho BI Server工程
查看>>
JSP的内置对象及方法
查看>>