high-resolution

About responsive sites, pixels, and density

冷暖自知 提交于 2019-12-02 10:48:31
I have coded a responsive website, in which I have CSS media queries to detect the screen size(pixels) of the device the user is navigating with. Just standard medias. Example: @media (max-width: 1199px){ /*code*/ } @media (max-width: 991px){ /*code*/ } @media (max-width: 767px){ /*code*/ } When I test my website with my mobile, which is a Samsung Galaxy S4 with 1920x1080 pixels my website shows me the mobile version, which is in this case the @media query with a max-width of 767px. I understand that most things would be too small to read or be seen if my mobile respected exact measures like

Creating huge high-resolution Bitmap bigger than 23k x 23k

跟風遠走 提交于 2019-12-02 08:51:36
I want to create a huge resolution Bitmap-image so that to load it into memory and transform it based on user-gestures. I noticed that the limit for new Bitmap(int32,int32); is around 23000 but I need like 1159480 x 45920 with a bitdepth of 32. Can someone help me out or is this impossible to do? I have 8 gigs of RAM. ARE YOU REALLY SURE YOU NEED SUCH SIZE? It should be bigger than than 150GB . Moreover if you consider a point size of 1/72 of inch your image will be 409 km 500 m... EDITED If you need a high resolution image of a large area you should consider to use multiple images with

High Resolution Timing Part of Your Code

不羁岁月 提交于 2019-11-30 14:20:57
I want to measure the speed of a function within a loop. But why my way of doing it always print "0" instead of high-res timing with 9 digits decimal precision (i.e. in nano/micro seconds)? What's the correct way to do it? #include <iomanip> #include <iostream> #include <time.h> int main() { for (int i = 0; i <100; i++) { std::clock_t startTime = std::clock(); // a very fast function in the middle cout << "Time: " << setprecision(9) << (clock() - startTime + 0.00)/CLOCKS_PER_SEC << endl; } return 0; } Related Questions: How to overcome clock() 's low resolution High Resolution Timer with C++

High-resolution timer for iPhone?

爷,独闯天下 提交于 2019-11-30 08:38:23
I'm looking for high-resolution timing code for iPhone, in order to do some performance timings. I'd like to write code like this: HighResolutionTimer* myTimer = [[HighResolutionTimer alloc]init]; [myTimer start]; [self doSomeLengthyOperation]; NSLog( @"doSomeLengthyOperation took %f seconds", [myTimer elapsedTime] ); Look into mach_absolute_time() in the mach/mach_time.h header. Don't use NSDate. NSDate isn't even guaranteed to not go backwards occasionally, when ntp does its thing. (Devices can have clock drift. If the iOS device drifts fast a few seconds, then when NTP corrects this drift,

Detecting HiDPI Windows Phone 8 Devices

我的未来我决定 提交于 2019-11-30 05:10:18
How do I detect HiDPI devices running Windows Phone 8? The phone I'm testing is the Nokia Lumia 920, which has a 4.5-inch 1280 × 768 screen (i.e. > 300 dpi). IE supports min-resolution in CSS but not min-device-pixel-ratio . Using this device pixel density test , the Lumia reports 96 dpi . This is far lower than the actual screen resolution, and would be considered a regular non-HiDPI device. Since IE doesn't (yet) support window.devicePixelRatio in JavaScript, I can't find a way to accurately detect the Lumia as capable of displaying HiDPI images. amannm Check out http://timkadlec.com/2013/01

How do You Resize a High Resolution Picture with PHP

旧城冷巷雨未停 提交于 2019-11-30 00:50:52
I'm processing images when the user uploads a pic but my problem is high rez pics. How do you detect when the user uploads one? I'm using the GD library for PHP. Setting the quality to 90 with the imagejpeg() method doesn't do anything to it but scales the dimension and then sets the ppi to 72. I want to be able to preserve the dimension and drop the ppi to 72 at the same time. Any advice would be greatly appreciated. There is no such thing as PPI as far as you need to be concerned. Also, DPI doesn't exist in digital. There are only pixels, and the dimensions (which are just a measurement of

How to get [UIImage imageWithContentsOfFile:] and High Res Images working

99封情书 提交于 2019-11-29 23:18:56
As many people are complaining it seems that in the Apple SDK for the Retina Display there's a bug and imageWithContentsOfFile actually does not automatically load the 2x images. I've stumbled into a nice post how to make a function which detects UIScreen scale factor and properly loads low or high res images ( http://atastypixel.com/blog/uiimage-resolution-independence-and-the-iphone-4s-retina-display/ ), but the solution loads a 2x image and still has the scale factor of the image set to 1.0 and this results to a 2x images scaled 2 times (so, 4 times bigger than what it has to look like)

How do I prepare images for all the Android resolutions?

删除回忆录丶 提交于 2019-11-29 20:41:50
In iOS preparing graphics is simple. There are either a normal image (height x width) or a retina image which is @2x (2 times height x 2 times width). However, since I'm new to Android, I see a ton of drawable-* folders in Eclipse where the * can be "hdpi" or "ldpi" or "mdpi" or "xhdpi" or "xxhdpi". Can someone very clearly and simply list for me what I must do to satisfy each of the display possibilities so my images will look right in each instance? I'm envisioning an answer will be a bullet list with each "*" listed and a sub-bullet list including the things that must be done. I'd also

High-resolution timer for iPhone?

烂漫一生 提交于 2019-11-29 12:17:00
问题 I'm looking for high-resolution timing code for iPhone, in order to do some performance timings. I'd like to write code like this: HighResolutionTimer* myTimer = [[HighResolutionTimer alloc]init]; [myTimer start]; [self doSomeLengthyOperation]; NSLog( @"doSomeLengthyOperation took %f seconds", [myTimer elapsedTime] ); 回答1: Look into mach_absolute_time() in the mach/mach_time.h header. Don't use NSDate. NSDate isn't even guaranteed to not go backwards occasionally, when ntp does its thing.

How to realise long-term high-resolution timing on windows using C++?

有些话、适合烂在心里 提交于 2019-11-29 07:26:19
I need to get exact timestamps every couple of ms (20, 30, 40ms) over a long period of time (a couple of hours). The function in which the timestamp is taken is invoked as a callback by a 3rd-party library. Using GetSystemTime() one can get the correct system timestamp but only with milliseconds accuracy, which is not precise enough for me. Using QueryPerformanceTimer() yields more accurate timestamps but is not synchronous to the system timestamp over a long period of time (see http://msdn.microsoft.com/en-us/magazine/cc163996.aspx ). The solution provided at the site linked above somehow