• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can't cache image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't cache image


  • Subject: Re: Can't cache image
  • From: Jan Van Tol <email@hidden>
  • Date: Fri, 21 Mar 2003 14:51:12 -0600

On Friday, March 21, 2003, at 02:46 PM, Greg Titus wrote:


On Friday, March 21, 2003, at 12:25 PM, Jan Van Tol wrote:

I've had this same problem, and I narrowed it down to simply creating a very large NSImage, then locking focus on it. I can have the exact same code start to give the can't cache image error simply by initing a larger image.

If anyone knows of a workaround, I would love to hear it.

Nope, there isn't really a workaround that I am aware of. When you lockFocus on an NSImage, it creates an NSCachedImageRep, which is really a window that just happens to not be on the screen. So when you create a very large NSImage and lockFocus, AppKit tries to make a very large window, and fails.

The limit, last time I checked, was somewhere around a size of 2500 in either width or height. (Thus a 3000x1 image will fail, even though it has the same number of pixels as a 30x100 image, which will succeed.)

- Greg

Ok, thanks for the response. I need this image in order to draw it into a view. Is it possible that I could draw it in pieces into my view, or do views have a limitation on size too?

-Jan Van Tol
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Can't cache image
      • From: Greg Titus <email@hidden>
References: 
 >Re: Can't cache image (From: Greg Titus <email@hidden>)

  • Prev by Date: Re: Can't cache image
  • Next by Date: Suppressing "Unformatted disk" Dialouge
  • Previous by thread: Re: Can't cache image
  • Next by thread: Re: Can't cache image
  • Index(es):
    • Date
    • Thread