retina-display

Creating retina screenshot programmatically resulting in non retina image

只谈情不闲聊 提交于 2019-12-05 21:48:50
I am trying to take a retina screenshot programmatically and I have tried every approach found online, but I was not able to get the screenshot to be retina. I understand the following private API: UIGetScreenImage(); cannot be used as Apple will reject your app. However, this method returns exactly what I need (640x960 screenshot of the screen). I have tried this method on my iPhone 4 as well as the iPhone 4 simulator on retina hardware, but the resulting image is always 320x480. -(UIImage *)captureView { AppDelegate *appdelegate = [[UIApplication sharedApplication]delegate]; if ([[UIScreen

On iPhone5 [[UISCreen mainScreen] bounds].size comes back as 320x480?

▼魔方 西西 提交于 2019-12-05 21:11:59
问题 On iPhone5 [[UISCreen mainScreen] bounds].size comes back as 320x480. Why. In all the posts I'm reading, people are saying that it returns the correct screen size. What is going on here? Am I missing something in the .plist file or something? BTW I am hand coding the GUI, so there is no XIB. 回答1: Unless your app includes a Default-568h.png in it's bundle, it will run inside a 480 point high legacy screen sandbox on the iPhone 5, and can't draw or see any dimensions outside that sandbox. Note

Why is the scale representing screen size wrong in iOS for my iPad Mini?

女生的网名这么多〃 提交于 2019-12-05 19:56:46
I have a 1st generation iPad Mini ( Model A1432 ) with a screen resolution of 1024x768 ( documentation ). I have the following code in my app: CGRect screenBounds = [[UIScreen mainScreen] bounds]; CGFloat screenScale = [[UIScreen mainScreen] scale]; CGSize screenSize = CGSizeMake(screenBounds.size.width * screenScale, screenBounds.size.height * screenScale); screenSize.height and screenSize.width report: 2048x1536, which is wrong. The screenScale value is 2, but it is my understanding that it should only be 2 for retina screens, which the 1st generation iPad Mini is not. Any ideas why this

html5 canvas game - how to add retina support

删除回忆录丶 提交于 2019-12-05 17:49:36
问题 I'm creating an HTML5 canvas game for iPhone. I would like to support both retina and non-retina displays. My question is, how do I support both retina and non-retina displays? I.E., what is the general implementation for doing this? Do I write the game using the iPhone dimension and then add retina support? Or do I create the game retina size and add non-retina support? Is it best to have two images, one retina one non-retina? or just scale the retina image down? Do I have separate canvas

background-size: cover looks pixelated on retina display

南楼画角 提交于 2019-12-05 15:56:24
The website I'm working on can be seen here . If you check out the 'About' or 'Contact' section on iPad 3 or iPhone 4 the background looks all crazy pixelated. I've got the background-size set to cover so that when the user resizes it it scales appropriately, however on iPad or iPhone it looks terrible. Any help or tips on how to fix this for devices @media only screen and (min-device-pixel-ratio: 2) ? Thank you. It's because you are using background-attachment:fixed - for whatever reason this when used with background-size: cover on iOS causes this behavior. (I had this same bug at http://jag

How to detect if iPhone has retina display or not?

可紊 提交于 2019-12-05 10:29:15
How can I detect if an iPhone has a retina display or not? Is there a reliable way? Either pure PHP or preferably Zend Framework way of doing this. You must consider the fact that you are trying to get client side information on the server side. It would seem that you are unable to detect the display with pure PHP or Zend framework. It furthermore seems like the UserAgent information from the client, that you might access from PHP is based upon the OS, not the hardware, and thusly does not help you. You might be interested in reading the following article which much more eloquently and

Is this possible to simulate an retina display OS X on non retina display Mac?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-05 05:06:32
问题 I am using an iMac to do OS X App Development, but my iMac is not a retina display. Is this possible to let me simulate the result on retina display Mac? Thanks. 回答1: I used Quartz Debug to get a HiDPI entry in Displays. This was pre-Mavericks, so I'm not sure if that's still the recommended way to do it. The answers here mention a couple different ways. You may also need to hold Option while clicking on "Scaled" in Displays. 来源: https://stackoverflow.com/questions/30872623/is-this-possible

What is the iDOT chunk

拟墨画扇 提交于 2019-12-05 04:39:42
Looking at a screenshot I took on a MacBook Pro with Retina display and running OS X 10.11, I found that it contained these chunks: IHDR, iCCP, pHYs, iTXt, iDOT, IDAT…, IEND All of these are part of the 2003 spec , except for iDOT which is a small (28 bytes) chunk. According to the chunk naming conventions , the fact that its second letter is capital should indicate that it's a chunk with a public specification. I couldn't find its specification anywhere yet though. It's not listed in the Register of public PNG chunks and keywords, Version 1.4.6 either, although that appears to be the latest

iOS Retina display: images double size

爷,独闯天下 提交于 2019-12-05 04:35:40
问题 For testing not/retina display I've created an UIView with size 100x100. I've create 2 images: - normal size (100x100) - retina size (200x200) I have two situations: 1) Non-Retina display + Normal Size image in background 2) Retina display + Retina Size image in background The 1st scenario is ok. In the 2nd scenario the image is double size and in my UIView I can see only 1/4 of the total image. The same happens when I try to assign a background image to my UIViewController navigation bar as

Drawing on the retina display using CoreGraphics - Image pixelated

ⅰ亾dé卋堺 提交于 2019-12-05 02:17:04
In my iOS application, I am trying to draw curves using CoreGraphics. The drawing itself works fine, but on the retina display the image gets drawn using the same resolution, and does not get pixel doubled. The result is a pixelated image. I am drawing using the following functions: - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; CGPoint currentPoint = [touch locationInView:self.canvasView]; UIGraphicsBeginImageContext(self.canvasView.frame.size); [canvasView.image drawInRect:self.canvasView.frame]; CGContextRef ctx =