Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in C only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
C
How to rotate an image by 180 degree clockwise and counterclockwise using C codes?
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
Rohit Ramesh
New Member
Join Date:
Mar 2010
Posts:
5
#1
How to rotate an image by 180 degree clockwise and counterclockwise using C codes?
Mar 15 '10, 05:53 AM
I need help in C program in order to rotate any image clockwise and anticlockwise.
I searched a lot on net but couldn't able to find any solution.
newb16
Contributor
Join Date:
Jul 2008
Posts:
687
#2
Mar 15 '10, 09:22 AM
Does cw and ccw rotation differ in case of 180 degrees? Anyway, after you read the image from file and stored it in the array of pixels, swap appropriate pixels values for the whole array.
Comment
Post
Cancel
donbock
Recognized Expert
Top Contributor
Join Date:
Mar 2008
Posts:
2427
#3
Mar 15 '10, 01:22 PM
What is the format of the image?
Comment
Post
Cancel
Rohit Ramesh
New Member
Join Date:
Mar 2010
Posts:
5
#4
Mar 15 '10, 02:26 PM
image is in jpeg and size is 160*120. Please suggest me algorithm so that i can build some codes.. In image processing i am very new.
Comment
Post
Cancel
jkmyoung
Recognized Expert
Top Contributor
Join Date:
Mar 2006
Posts:
2057
#5
Mar 15 '10, 03:03 PM
As an opening, slow method, I suggest you first
Convert the jpg into a 160x120 set of pixels.
Rotate them accordingly, eg (i,j) -> (160-i, 120-j).
Convert the pixels, back into a jpg.
Once you've done this, you should be able to see a refinement in your method.
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment