orientation

Lossless JPEG rotation during decoding with libjpeg

混江龙づ霸主 提交于 2019-12-08 14:48:26
I've got a simple C++ app that decodes JPEGs with libjpeg - however, some of the images it processes come out sideways! These input images have orientations baked in to the EXIF data by the camera, but it seems that during decompression, libjpeg isn't taking the orientation flag into account as many JPEG viewers do. Is there a way to get libjpeg to respect the orientation of the JPEG during decompression, or will I have to parse out this orientation tag and manually rotate the image? the transupp.h header in libjpeg defines an API for lossless rotation. Included is also, jpegtran.c, source

Flash Pro AS 3.0 Air for iOS, Orientation Event not working

北城以北 提交于 2019-12-08 13:29:20
问题 I'm developing an app with a default orientation set to Portrait in Flash Air for iOS settings; and the auto orientation is off. However after adding a certain movieClip I want it to detect if the orientation changes and then change its position for a landscape or portrait display. The problem is that StageOrientationEvent.ORIENTATION_CHANGE wont be dispatched if I disable the auto orientation. And even if it is enabled, the listener will only dispatch when the orientation changes to upside

frame doesnt changes while orientation in ipad

大城市里の小女人 提交于 2019-12-08 12:46:21
问题 In my root view controller's viewDidLoad, i added an observer for orientation detection: [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(willRotateToInterfaceOrientation:duration:) name:@"UIDeviceOrientationDidChangeNotification" object:nil]; Added the method like: - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { NSLog(@

Alternate landscape triggered at unwanted view

主宰稳场 提交于 2019-12-08 12:44:23
问题 I have a view controller that contains an image and a tableview. From this view controller I connected a segue to a landscape view that contains the image in full screen (same idea used when you turn sideways the Stocks app from Apple to see the graph in full screen). This segue is called by the following method: - (void)updateLandscapeView { UIDeviceOrientation deviceOrientation = [UIDevice currentDevice].orientation; if (UIDeviceOrientationIsLandscape(deviceOrientation) &&

How to open camera with a portrait orientation?

穿精又带淫゛_ 提交于 2019-12-08 09:11:56
问题 My whole android camera app is in portrait mode, so when I open the camera I need it to automatically open in portrait mode. When I open the camera now the preview is sideways. How do I set the camera preview to open in portrait mode so the preview will look right? 回答1: You could use this method from the Android Developer documentation to rotate the camera preview. public final void setDisplayOrientation (int degrees) Set the clockwise rotation of preview display in degrees. This affects the

Saving current page of view pager

a 夏天 提交于 2019-12-08 08:03:37
问题 I have a view pager on portrait mode. On landscape mode I have completely different layout. After coming back to portrait from landscape, I want to see last seen page of viewpager. But always first page is on the screen. Here are my codes: public class MainActivity extends FragmentActivity { public static ViewPager pager=null; public static FragmentAdapter adapter; PageIndicator mIndicator; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

drawable-land vs drawable

ぃ、小莉子 提交于 2019-12-08 07:47:00
问题 I am not using a layout-land, but do have drawable-land. The problem is, it uses whichever drawable matches the orientation when the activity starts . I would like it to switch between using the drawable/drawable-land when the phone rotates. Is there a way to do this easily? Or should I just copy and paste my layout into layout-land, so that it actually recreates the activity? (I assume that would do the right thing, but ideally I would like it to just refresh the drawable using the correct

Error in iOS 6 after adding GameCenter to a landscape-only cocos2d app

泪湿孤枕 提交于 2019-12-08 07:45:01
问题 I'm having the issue described here: https://devforums.apple.com/thread/165384?tstart=0 Where my app crashes trying to load the GameCenter login screen because the screen is in portrait and my app only supports landscape. I've tried every solution described in the above thread, as well as all the solutions on the following thread: Crash on presenting UIImagePickerController under iOS 6.0 And here: http://www.cocos2d-iphone.org/forum/topic/36639 None of the solutions work. Either the crash

App Orientation in iOS9 Split View

无人久伴 提交于 2019-12-08 07:35:48
问题 I'm looking at how my app will run in Split View on an iPad Pro. I use constraints for layout, but sometimes I want to know the window orientation in order to tweak the layout by modifying a couple of constraints. Things are easy to handle if the user rotates the device (I handle the call of viewWillTransitionToSize), but the app has to know its initial orientation. Until now, I have been using the status bar orientation to determine the device orientation: UIInterfaceOrientation o = [

iPhone orientation management : what is the most efficient way to do?

夙愿已清 提交于 2019-12-08 07:11:03
问题 I need to develop an iPad application which should manage the two orientation mode (landscape and portrait). According the official Apple iOS documentation, there are 2 ways to proceed. -The first one consists in adjusting views element when the rotation event is received. The main advantage is that we had only one ViewController -The second one consists in displaying a specific ViewController for each orientation. Therefore, we have 2 ViewControllers. The second approach seems to be nice,