Jpeg rotation in C/C++
Asked by
Espin01 (
32
)
February 26th, 2008
I am making a program that will rotate all of the jpeg’s in a folder 90 degrees counter clockwise. Does anybody know how to preform this action in C/C++
Observing members:
0
Composing members:
0
4 Answers
In raw code? Basically you want to decode the JPG into a bitmap, rotate it (simple transform of pixels), then re-encode it. But you might want to use calls to someone’s existing code or module for it, especially since not all JPG encoding is equally good. Depends on the context etc.
Depending on what you want to do.. This would be simple with RMagick and Ruby.
If you just want to grab a folder of images and rotate them a Ruby script will be easiest. You could use PHP too, I prefer Ruby.
Ok, thanks. My new question is how would I do it in Ruby?
Ah, nevermind. I googled RMagick and I gound my answer. Thanks a lot guys!
Answer this question 
This question is in the General Section. Responses must be helpful and on-topic.