Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
How to set orientation property of an image before save?
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
kls dngr
9y
303
1
Reply
foreach (var prop in img.PropertyItems)
{
if (prop.Id == 0x0112) //value of EXIF
{
var orientation = img.GetPropertyItem(prop.Id).Value[0];
switch (orientation)
{
case 1:
// No rotation required.
break;
case 2:
img.RotateFlip(RotateFlipType.RotateNoneFlipX);
break;
case 3:
img.RotateFlip(RotateFlipType.Rotate180FlipNone);
I have used above code to detect whether image orietation is changed from original. Suppose I have get orientation value as "3" and I want to set it to normal that is "1", so how I could replace that orientation property value 3 by 1...??
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
How to find the row id of selected Gridview Row in Asp.net
Web grid data load with column format very slow