catiledlayer

how to handle tiling of images on the fly

笑着哭i 提交于 2019-12-02 08:03:00
I am writing an app which would tile the images 256 * 256 and write those tile files back in the directory. I am updating my URL each time if there are any updates and tile those images back and store in the iphone folder. I am worried about two main things : 1) Memory consumption -- will the memory consumption for 5 images of size 200 KB a lot ? 2) How fast I can process my app if I have to tile 5 different URL with images at the same time ? I have written a code to tile and save in the directory for one URL and would like to do the same for 5 URLs. Is it recommended to go with this approach

What is the secret behind “contentScaleFactor” of UIView when used with CATiledLayer?

烂漫一生 提交于 2019-11-29 21:49:21
Greetings, I'm working on an application inspired by the "ZoomingPDFViewer" example that comes with the iOS SDK. At some point I found the following bit of code: // to handle the interaction between CATiledLayer and high resolution // screens, we need to manually set the tiling view's // contentScaleFactor to 1.0. (If we omitted this, it would be 2.0 // on high resolution screens, which would cause the CATiledLayer // to ask us for tiles of the wrong scales.) pageContentView.contentScaleFactor = 1.0; I tried to learn more about contentScaleFactor and what it does. After reading everything of

CATiledLayer in iPad retina simulator yields poor performance

大城市里の小女人 提交于 2019-11-29 20:12:37
I'm hoping maybe this is just an issue with the simulator but of course it has me worried since I have already submitted my retina capable apps and there's no way to test it until the 16th. I have implemented a CATiledLayer in my app to view very large maps. The tiles for the map are coming from the internet, however they also get cached, so, typically, they are actually being loaded directly from the device. On iPad 1 and iPad2 it works beautifully. You can only barely notice the tiles being rendered on the iPad 2, even when they are coming from the internet. On the iPad Simulator it works

Drawing in CATiledLayer with CoreGraphics CGContextDrawImage

廉价感情. 提交于 2019-11-29 14:55:16
问题 I would like to use a CATiledLayer in iPhone OS 3.1.3 and to do so all drawing in -(void)drawLayer:(CALayer *)layer inContext:(CGContext)context has to be done with coregraphics only. Now I run into the problems of the flipped coordinate system on the iPhone and there are some suggestions how to fix it using transforms: Image is drawn upside down CATiledLayer or CALayer not working My problem is that I cannot get it to work. I started using the PhotoScroller sample code and replacing the

Huge images in iOS app without CATiledLayer?

China☆狼群 提交于 2019-11-29 00:37:34
I have an image at about 7000x6000px. I need this to be in a scrollview/imageView in my app, however this is way to huge for display. It is supposed to be a kind of map. I was hoping to keep the size of the app to the minimum, and the image is just about 13mb in .jpg. In .png it is over 100mb, which is unacceptable. Many have suggested CATiledLayer as an option, but I believe this would result in even bigger file sizes. Anyway, I tried to do it with CATiledLayer , and create my own tiles in TileCutter, (tiles in .jpg), and the size wasn't too bad. But I am having errors all over the place. The

What is the secret behind “contentScaleFactor” of UIView when used with CATiledLayer?

自古美人都是妖i 提交于 2019-11-28 17:40:52
问题 Greetings, I'm working on an application inspired by the "ZoomingPDFViewer" example that comes with the iOS SDK. At some point I found the following bit of code: // to handle the interaction between CATiledLayer and high resolution // screens, we need to manually set the tiling view's // contentScaleFactor to 1.0. (If we omitted this, it would be 2.0 // on high resolution screens, which would cause the CATiledLayer // to ask us for tiles of the wrong scales.) pageContentView

Huge images in iOS app without CATiledLayer?

独自空忆成欢 提交于 2019-11-27 15:22:01
问题 I have an image at about 7000x6000px. I need this to be in a scrollview/imageView in my app, however this is way to huge for display. It is supposed to be a kind of map. I was hoping to keep the size of the app to the minimum, and the image is just about 13mb in .jpg. In .png it is over 100mb, which is unacceptable. Many have suggested CATiledLayer as an option, but I believe this would result in even bigger file sizes. Anyway, I tried to do it with CATiledLayer , and create my own tiles in

Reading text and images from a pdf document in iOS

走远了吗. 提交于 2019-11-26 17:17:26
问题 I'm displaying locally stored pdf in my iPad application. Here's the code: NSString *path = [[NSBundle mainBundle] pathForResource:@"About Downloads" ofType:@"pdf"]; NSURL *targetURL = [NSURL fileURLWithPath:path]; NSURLRequest *request = [NSURLRequest requestWithURL:targetURL]; [pdfWebView loadRequest:request]; Now, by default, you can't copy text or images from the PDF which is rendered by the UIWebView. Is there a way to let users copy text and/or images out of pdf? I'm not familiar with