如何在C ++中操纵/旋转JPEG图像? [英] How can I manipulate/rotate a JPEG image in C++?
问题描述
我想使用编译的libjpeg-9 example.c和transupp.c代码和库在Eclipse项目中旋转.jpg图片。
I'd like to use the compiled libjpeg-9 example.c and transupp.c code and libraries to rotate a .jpg image in an Eclipse project.
从一开始就实现此目标的工作进度:在Windows for Eclipse中编译/使用libjpeg
Working progress on achieving this from the start: Compiling/using libjpeg in Windows for Eclipse
尝试将do_rot_180和读/写功能集成到一个位置: jcopy_block_row无法解析+ wierd eclipse行为 transupp中的
Trying to integrate do_rot_180 and read/write functions into one location: jcopy_block_row cannot be resolved + wierd eclipse behavior
推荐答案
do_rot_180
在 libjpeg
(你知道它是Q有标签)正在做你想要的。
do_rot_180
function in transupp.c
in libjpeg
(you are aware of it as the Q has the tag) is doing exactly what you want.
LOCAL(void)
do_rot_180 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
jvirt_barray_ptr *src_coef_arrays,
jvirt_barray_ptr *dst_coef_arrays)
/* 180 degree rotation is equivalent to
* 1. Vertical mirroring;
* 2. Horizontal mirroring.
* These two steps are merged into a single processing routine.
*/
该函数由 jtransform_execute_transformation
/ JXFORM_ROT_180
和loslessy重新排序JPEG的内部实现旋转效果。 此功能演示了使用和旋转给定文件,使用指定的转换(角度)写入一个新的修改文件。
The function is used by jtransform_execute_transformation
/JXFORM_ROT_180
and loslessy reorders JPEG's internals to achieve rotation effect. This function demonstrates the use and rotates a given file and writes a new modified file using specified transformation (angle).
这篇关于如何在C ++中操纵/旋转JPEG图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!