resolution

MonoDroid apps don't use correct density drawables

最后都变了- 提交于 2020-02-16 05:13:26
问题 I am getting some very interesting results when testing an app developed with MonoDroid on different devices with varying screen sizes and densities. I have the following (simplified) folder structure set up in my project: drawable image.png drawable-ldpi image.png drawable-mdpi image.png drawable-hdpi image.png drawable-xhdpi image.png The image in drawable is that of a folder. The images in the other folders are identical except for the size and a letter that is drawn on top to indicate

Set resolution manually in Java Swing

安稳与你 提交于 2020-02-02 15:58:20
问题 I need a way to manually control/stretch the size of my whole GUI. I have a 1400 x 1050 Desktop (native resolution) and I want to scale the resolution manually to 1024 x 1050 inside the code, because my application was written on/for a 1024 x 768 Desktop. So in general the whole frame and all buttons etc should be stretched / bigger as a whole and the relation should stay the same. I can´t do it via Windows properties because the resolution in general needs to be 1400 x 1050 because of

Image size considering (or not) h/v resolution

為{幸葍}努か 提交于 2020-01-24 21:06:13
问题 I have two images: Name Type Width Height HRes VRes img01 GIF 256 256 384 96 img02 TIFF 1728 1147 200 100 Windows internal viewer shows them using different patterns : img01 is displayed as 256x256 image (square) img02 is displayed as a vertical image (despite of width>height) and image format is correct After seen img02 behaviour I thought that displayed size is given by: Display_Width = max(HRes,VRes) * Width / HRes Display_Height = max(HRes,VRes) * Height / VRes But that's not good for

template function with nested type cannot be deduced

流过昼夜 提交于 2020-01-23 13:26:06
问题 I am working with the SystemC library which requires all user defined types to have a operator<< and sc_trace() function. However the user defined type is actually a nested type inside a template class, because the "nested type" is computed from the template argument specified in the outer class. template<typename T> class Block { typedef typename transform<T>::value NewType; public: struct SomeType { SomeType() {} SomeType(T val) : member(val) {} NewType member; }; }; When I define the

Need to improve resolution of screenshot from OpenGL

旧城冷巷雨未停 提交于 2020-01-16 13:18:33
问题 I want to get a screen shot from current scene in OpenTK with good resolution. I am using GL.ReadPixels to get a photo for the scene.If I save the photo to disk; I found it with low resolution/quality. following C# code is used to get a photo for the scene : Bitmap bmp = null; if (GraphicsContext.CurrentContext != null) { glControl_window.Invalidate(); int w = glControl_window.ClientSize.Width; int h = glControl_window.ClientSize.Height; bmp = new Bitmap(w, h); System.Drawing.Imaging

List of valid resolutions for a given Screen?

岁酱吖の 提交于 2020-01-16 04:32:04
问题 Is there a way to get ALL valid resolutions for a given screen? I currently have a dropdown that is populated with all valid screens (using Screen.AllScreens ). When the user selects a screen, I'd like to present them with a second dropdown listing all valid resolutions for that display ( not just the current resolution). 回答1: I think it should be possible to get the information using Windows Management Instrumentation (WMI). WMI is accessible from .NET using the classes from them System

Matching the resolution of two rasters

会有一股神秘感。 提交于 2020-01-15 03:11:28
问题 Im working with two rasters each with a different resolution. Im wondering if there is a more efficient way of matching the coarser raster resolution to the finer raster resolution. Right now I am using the mask function to save some time, clip to the correct extent and change the resolution: library(raster) #the raster template with the desired resolution r <- raster(extent(-180, 180, -64, 84), res=0.04166667) # set some pixels to values, others to NA r <- setValues(r, sample(c(1:3, NA),

Query maximum webcam resolution in OpenCV

时光怂恿深爱的人放手 提交于 2020-01-13 17:08:08
问题 I'm dealing with several types of cameras and I need to know the maximum resolution each one is capable. Is there a way to query such property in OpenCV? If not, is there any other way? The application will work under Windows (by the moment) and all the project is being developed using C++. 回答1: A trick that's working for me: Just set to a very high resolution (above the capabilities of any usual capture device), then get the current resolution. You will see that the device will automatically

Xcode 6 loads 3x image incorrectly when app's Deployment Target is set to 6.0 or 6.1

浪尽此生 提交于 2020-01-13 03:13:11
问题 I get this issue when building UI in storyboard (or xib) in xcode's interface builder. After I assign the image (with the same name in asset catalog) to an image view in Interface Builder, the xcode loads 3x image file instead of 2x in any non-retinahd devices which is running ios8. Note that this bug only happens when app's deployment target is set to 6.0 or 6.1 . I'm using asset catalog to manage image resources. This issue is tested and happens both in Xcode 6.0.1 and 6.1 GM seed 2 . I

Android Low picture quality after shot

微笑、不失礼 提交于 2020-01-11 14:22:31
问题 I have a button that triggers an image capture : private void capturePicture() { if(ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.CAMERA) == PackageManager.PERMISSION_GRANTED){ Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); // Tiến hành gọi Capture Image intent startActivityForResult(intent, 100); } else ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.CAMERA}, 200); } Right after I take the shot, I see the capture and the