logo
down
shadow

how to tell if a photo was taken in landscape or portrait? JPEG .NET metadata orientation


how to tell if a photo was taken in landscape or portrait? JPEG .NET metadata orientation

By : Claire Chi
Date : January 02 2021, 06:48 AM
it helps some times Yes, there's an EXIF tag that can store the orientation. Tag number 274, values are documented here. Sample code to read the tags from the JPEG data is available here.
code :


Share : facebook icon twitter icon
Restrict my project to portrait only leaving photo view's in landscape/portrait

Restrict my project to portrait only leaving photo view's in landscape/portrait


By : Akshay Takalkar
Date : March 29 2020, 07:55 AM
like below fixes the issue I want my whole project to run in portrait mode only and only the view that's for viewing the photo's can turn on landscape same as if using the facebook (we view photo's they turn landscape also but other view's remains in portrait) i want to know that how it's done as i have a table view that has images that i get from the DB from the server and every particular data contains different number's of photo's so now i want that after the user select's the photo's they should open up fully and can be viewed in landscape and in portrait as well i did tried
code :
These only work on iOS 6.0

-(BOOL)shouldAutorotate
{
    return YES;
}

-(NSUInteger)supportedInterfaceOrientations
{
    return (UIInterfaceOrientationLandscapeRight | UIInterfaceOrientationLandscapeLeft);
}

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
    return UIInterfaceOrientationLandscapeRight;
}
    The method will return which orientation mode to use first.

    Below are supportedInterfaceOrientations:

    UIInterfaceOrientationMaskPortrait
    UIInterfaceOrientationMaskLandscapeLeft
    UIInterfaceOrientationMaskLandscapeRight
    UIInterfaceOrientationMaskPortraitUpsideDown 
    UIInterfaceOrientationMaskLandscape 
    UIInterfaceOrientationMaskAll
    UIInterfaceOrientationMaskAllButUpsideDown

    For iOS > 4.0
        - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return UIInterfaceOrientationIsLandscape(interfaceOrientation);
    }


Other ViewControllers will have 
-(BOOL)shouldAutorotate { return NO; } 
-(BOOL)shouldAutorotateToInterfaceOrientation:
(UIInterfaceOrientation)interfaceOrientation{     
return NO;
}
Supporting Universal App with Portrait Orientation on iPhone and Landscape+Portrait on iPad

Supporting Universal App with Portrait Orientation on iPhone and Landscape+Portrait on iPad


By : user3453107
Date : March 29 2020, 07:55 AM
I hope this helps . This is how I managed to get it working. In the AppDelegate.m, I added this method.
code :
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{
    //if iPad return all orientation
    if ((UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad))
        return UIInterfaceOrientationMaskAll;

    //proceed to lock portrait only if iPhone
    AGTabbarController *tab = (AGTabbarController *)[UIApplication sharedApplication].keyWindow.rootViewController;
    if ([tab.presentedViewController isKindOfClass:[YouTubeVideoPlayerViewController class]])
        return UIInterfaceOrientationMaskAllButUpsideDown;
    return UIInterfaceOrientationMaskPortrait;
}
# pragma mark - UIRotation Methods

- (BOOL)shouldAutorotate{
    return YES;
}

- (NSUInteger)supportedInterfaceOrientations{
    return (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) ? UIInterfaceOrientationMaskAll : UIInterfaceOrientationMaskPortrait;
}
Should I Record Video using DJI Osmo in Landscape or Portrait/Vertical Mode for iPhone Portrait Orientation

Should I Record Video using DJI Osmo in Landscape or Portrait/Vertical Mode for iPhone Portrait Orientation


By : Pooja Verma
Date : March 29 2020, 07:55 AM
wish of those help I recorded my first videos in the DJI portrait/vertical mode position and every time I played them back on my phone they would look fine in iPhone's landscape orientation but in iPhone's portrait orientation the videos would play in the center with a black bar on the top and another black bar on the bottom of it.
I went to the DJI store in Manhattan and the very helpful rep said the problem was I needed to first lock my phone in portrait orientation before recording in the DJI's portrait/vertical mode position to prevent that problem from happening. He said since I didn't have it locked even the iPhone was in a portrait position it was still recording in landscape mode.
IOS 6 Orientations - Only One Viewcontroller supports Landscape & Portrait orientation - else ONLY Portrait

IOS 6 Orientations - Only One Viewcontroller supports Landscape & Portrait orientation - else ONLY Portrait


By : manand
Date : March 29 2020, 07:55 AM
it should still fix some issue You can read this:
Multiple Orientations
How to make only camera screen orientation in both landscape and portrait while others being lock to portrait

How to make only camera screen orientation in both landscape and portrait while others being lock to portrait


By : Dhrmendr Singh
Date : March 29 2020, 07:55 AM
will help you You can use something like this: react-native-orientation
This is what I have seen commonly used to lock orientation on a screen per screen basis.
shadow
Privacy Policy - Terms - Contact Us © 35dp-dentalpractice.co.uk