I have an application using Nokia X2 which is 5 MPix camera. I need images only for 2 MPix. So I changed the settings on Phone to 2 MPix. When I take a snap by using Phones Camera application, I am getting a 2 MPix image. However, when I activate the camera through my J2ME Code, it gives me an image with 5 MPix. Any clue ?
You need to set the resolution for the camera through the API. It should look like something below.
cameraControl = (CameraControl)player.getControl("CameraControl");
cameraControl.setStillResolution(1)
You can read the supported resolutions with
int []res = cameraControl.getSupportedStillResolutions();
the the index of the returned array (res) is the value you set to CameraControl#setStillResolution()
Related
I work on a project that takes photo use DJI ,and I rotate the camera to ground ,and I can take photo use this method
rotation = [DJIGimbalRotation gimbalRotationWithPitchValue:[NSNumber numberWithInt:-90] rollValue:nil yawValue:nil time:0.01f mode:DJIGimbalRotationModeAbsoluteAngle];
but when I use this method in dpi spark, I got an error and it tells me failed ,how can I make the camera to ground in Spark ,anyone can help me ?
The Gimbal pitch value for Spark is [0,-85], so it's not available to set it as -90 and make the camera to ground in Spark using DJI Mobile SDK. You can check the capabilities property to get the pitch rotation range info: https://developer.dji.com/api-reference/ios-api/Components/Gimbal/DJIGimbal.html?search=capabilities&i=0&#djigimbal_gimbalcapabilities_inline
I found below problem in action script 3.
Using action script 3 with flash builder 4.7 when i try to load image of dimension 16000 X 16000 using below code it will CRASH my App and not able to show image.
Image size is 4.6 MB and Image dimension is 16000 X 16000 (Width X Height)
When i try with other image having Dimension 10000 X 3000 (Width X Height) it will work
var mapLoader:Loader=new Loader();
var loaderInfo:LoaderInfo=mapLoader.contentLoaderInfo;
loaderInfo.addEventListener(Event.COMPLETE, function(event:Event):void
{
var image:Image=new Image();
image.source=mapLoader.content;
image.width=image.source.width * 0.6;
image.height=image.source.height * 0.6;
image.smooth=true;
}
});
loaderInfo.addEventListener(IOErrorEvent.IO_ERROR,function(e:IOErrorEvent):void
{
//some code
});
mapLoader.load(new URLRequest(mapSrc));
Please help me and thanks in advance
Before Flash Player 11, there was a limitation on the size of any loaded image. As of Flash Player 11, this limitation as been removed, and the maximum size is dependent of the operating system.
Considering that Flash internally handle image as bitmaps, your 16000x16000px image requires around 1Gb of RAM by itself. This may be more than what your app is allowed (or even what your system is capable of).
Since you seems to be making an app, I would recommend using a tile system : the full map is cut down in smaller images, that are then placed side-by-side. Using this system, your app can load and show only the required tiles, strongly reducing the memory required, as well as the necessary bandwidth. If you don't want to show blank spaces while the tiles are loading, you can add a lowres image of the full-map under the tiles, so that the user see a blurred version of this section before the app finished loading the corresponding tile and show the highres version.
Just got the new Apple TV and I am trying to setup App Icons for a new app. It is asking for Front, Middle and Back images for both "App Icon - Large" and for "App Icon Small". I have tried putting a 512x512 image in for Middle and get the following error:
The last image stack layer with content, "Middle", must exactly fill the image stack. Its current frame is {{384, 128}, {512, 512}} while the image stack's size is {1280, 768}.
Does a 1280x768 image need to be used? More importantly, what exactly is needed in terms of image assets for tvOS Apps?
You need at least 2 images for both the App Icon - Large & App Icon - Small
(So total of 4 images - I used at first just the front & back, then I used all three layers for a total of 6 images)
The large icon is 1280x768, and the small one is 400 x 240
Apple's document:
https://developer.apple.com/tvos/human-interface-guidelines/icons-and-images/
Doesn't seems to specify that you only need one image for the 1280x768. But
I wasn't able to submit my App with just one image. I rendered my icons in the
full 1280x768 size and then scaled to 400 x 240.
In addition, you need to add the Top Shelf image which is 1920 x 720.
(Top Shelf Wide seems to be 2320 x 720.)
https://developer.apple.com/forums/thread/20689
Yes, you have add mismatched icons, that's why getting the error
Once you check all the sizes is correct
I am creating a emulator with options 720 X 1280 px, 5.5 inch size.
When I try my code on my real phone (a Galaxy Note II) the views are correct but when I use the emulator the view is just 2/3 of the screen. As we can say that the real phone shows the correct view, where is the problem with the emulator?
The real Note II has scale value 2 when I connect to it, but when I connect it to emulator it says scale value of 1.5, maybe the problem is this. How can I set the correct scale for the Note II phone in AVD or what am I doing wrong in AVD?
The scale is very important. See this tutorial: http://www.basic4ppc.com/android/forum/threads/17647/#content
You should set the DPI value to 320 (2 * 160).
XNA apps (WP7 or WP7.5 apps) that run on a WP8 720p device will get automatically letterboxed so the 480x800 BackBuffer size stays the same (for compatibility I presume).
This would be fine, except there appears to be a bug in the XNA compatibility layer. The TouchPanel reports touch locations that are off by the size of the top letterbox blank area.
This has two problems:
The user's touches will appear to be off making gameplay and menu navigation difficult.
Because it is off in the negative direction, the user will be unable to touch things at the very bottom of the screen at all.
I tried working around the issue by just factoring in 53 / 2 pixel offset (53 is the total amount of extra space in scaled coordinate, divide by two because it is only off by one letterbox bar - the one on the top). This does correct the touch location, but because TouchPanel internally clamps negative values to 0, it means that there is still a dead zone at the top of the game (because -22 through -1 should be translated to 0 through 22, but if all negative input values are clamped to 0 then information is lost and everything in the negative range will translate to 22 always).
Has anyone run into this and found a way to work around it?
I'v even tried resetting the TouchPanel.DisplayHeight/Width to the actual 720p values of the device and somehow it gets reset to 480x800 by the next frame update.
I just got this working, the TouchPanel.DisplayHeight needs to be set to 853 (if you detect you are on one of these 720p devices) very early. I do it at OnNavigatedTo from the main Silverlight page (this is SL/XNA actually).
Next, you have to offset every touch location and gesture location by + 53.0f / 2.0f.
I'm not sure why this didn't work before, as this is the solution I mentioned above that didn't seem to work because TouchPanel kept resetting to 800 height.
But, I got it working in both a reduced repro (new SL/XNA app) and my main game app.
I was working on a game a couple days ago.
It was packaged for 7.1, but worked fine on the 720p emulator.
I don't know much about the compatibility layer, if it gets effected by the size of images then here goes :
I created separate images for WVGA, WXGA and 720p. Used them and found out about the letterboxing and decided to use 720p images for all.
Probably doesn't help but there you go anyway.
This is great solutio what I found from here: http://developer.nokia.com
It's not just fixing issue with touch but it also remove black blocks from side. Of course depending about your programn this can cause some more issues since resolution and screen ratio will change.
if (Environment.OSVersion.Version.Major == 8)
{
int? scaleFactor = null;
var content = System.Windows.Application.Current.Host.Content;
var scaleFactorProperty = content.GetType().GetProperty("ScaleFactor");
if (scaleFactorProperty != null)
{
scaleFactor = scaleFactorProperty.GetValue(content, null) as int?;
}
if (scaleFactor == null)
scaleFactor = 100;
if (scaleFactor == 150)
{
SharedGraphicsDeviceManager sdm = SharedGraphicsDeviceManager.Current;
sdm.PreferredBackBufferHeight = 800;
sdm.PreferredBackBufferWidth = 450;
TouchPanel.DisplayHeight = 800;
TouchPanel.DisplayWidth = 450;
}
}