• 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: - [NSBitmapImageRep tiffRepresentation] malloc error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: - [NSBitmapImageRep tiffRepresentation] malloc error


  • Subject: Re: - [NSBitmapImageRep tiffRepresentation] malloc error
  • From: David Duncan <email@hidden>
  • Date: Fri, 12 Dec 2008 14:28:13 -0800

On Dec 12, 2008, at 12:50 PM, Thomas Clement wrote:

The image was 14340 x 14173 (8-bit RGB with no alpha).

Also I got these messages in the console:
kernel[0]: (default pager): [KERNEL]: no space in available paging segments
malloc: *** mmap(size=1073741824) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Attempt to allocate 1073741824 bytes for NS/CFData failed

Yup, your running into malloc() and VM space issues.

What approach should I take to handle large images?


I don't think there is an equivalent to this in AppKit, but you can do this using Core Graphics & ImageIO. The MassiveImage sample demonstrates how you can stream very large images (up to 32k x 32k iirc) to disk.

<http://developer.apple.com/samplecode/MassiveImage/index.html>
--
David Duncan
Apple DTS Animation and Printing

_______________________________________________

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


  • Follow-Ups:
    • Re: - [NSBitmapImageRep tiffRepresentation] malloc error
      • From: Thomas Clement <email@hidden>
References: 
 >- [NSBitmapImageRep tiffRepresentation] malloc error (From: Thomas Clement <email@hidden>)
 >Re: - [NSBitmapImageRep tiffRepresentation] malloc error (From: David Duncan <email@hidden>)
 >Re: - [NSBitmapImageRep tiffRepresentation] malloc error (From: Thomas Clement <email@hidden>)

  • Prev by Date: Re: NSBitmapImageRep orientation?
  • Next by Date: Re: - [NSBitmapImageRep tiffRepresentation] malloc error
  • Previous by thread: Re: - [NSBitmapImageRep tiffRepresentation] malloc error
  • Next by thread: Re: - [NSBitmapImageRep tiffRepresentation] malloc error
  • Index(es):
    • Date
    • Thread