• 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: How is image drawing rate effected by image resolution and size?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How is image drawing rate effected by image resolution and size?


  • Subject: Re: How is image drawing rate effected by image resolution and size?
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Tue, 5 Aug 2008 21:15:25 +0200


Le 5 août 08 à 19:48, Frederick Bartram a écrit :

I am having difficulty understanding the issues involved in image drawing speed.

I have a large, ~10K x 10K image in a scrolling view. The image is loaded as a PNG file into an NSImageView from a nib. I am getting large differences in the image drawing speed that I do not understand. The image at a resolution of 72dpi, at the default settings as loaded from the nib, draws very,very slowly.

If I change the size of the image either larger or smaller, drawing rate increases dramatically.
If I change the resolution from 72dpi to 96dpi, for example, but not the total pixel count then the image drawing rate also improves greatly.


Can someone provide some guidance as to what is happening?

Many thanks,

RickB

The NSImage use differents representations to store your image data, and probably create NSCachedImageRep when the image does not have expected caracteristics (72 dpi ) and when you resize it.
The NSCchedImageRep use an internal representation that is optimal for drawing, that probably explain your difference.


See the Image section of Cocoa Drawing guide for details and some tips to change the caching behavior of an image:

http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaDrawingGuide/Images/chapter_7_section_2.html


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >How is image drawing rate effected by image resolution and size? (From: Frederick Bartram <email@hidden>)

  • Prev by Date: Re: GetDblTime, 64-bit, and cocoa
  • Next by Date: Re: Using performSelector: on super
  • Previous by thread: How is image drawing rate effected by image resolution and size?
  • Next by thread: Loading a class with a specific superclass from a bundle
  • Index(es):
    • Date
    • Thread