Re: - [NSBitmapImageRep tiffRepresentation] malloc error
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