General Question

Espin01's avatar

Jpeg rotation in C/C++

Asked by Espin01 (32points) 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

Zaku's avatar

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.

jrpowell's avatar

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.

Espin01's avatar

Ok, thanks. My new question is how would I do it in Ruby?

Espin01's avatar

Ah, nevermind. I googled RMagick and I gound my answer. Thanks a lot guys!

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther