saving big image crashes
saving big image crashes
- Subject: saving big image crashes
- From: 김경옥 <email@hidden>
- Date: Wed, 24 Nov 2004 14:30:59 +0900
Hi,
I'm implementing a cocoa
application in Obj-C for editing images.
Users can resize image in
pixels using the application.
When I resize 450 x 300(pixels)
image to 9000 x 9000 and save it with new size,
the new image is saved but
the application crashes during reopening the resized image with a message as
follows:
----------------------------------------------------------
***
malloc:vm_allocate(size=24307324) fail (error code=3)
*** malloc[874]: error:Can't
allocate region
Executable "application" has
exited due to signal 10 (SIGBUS).
----------------------------------------------------------
The point the application
crashes is the line as follows:
aImage = [[NSImage alloc]
initWithData:[newImage TIFFRepresentation]];
And when I resize the same
image to 10000 x 10000 and save it with new size,
the application crashes during
the new image is saved.
The program is abnoramlly
exited at the line of code without any error code as
follows:
TiffRef = [[NSBitmapImageRep
alloc] initWithData:[temp_image TIFFRepresentation]];
the temp_image is resized
image.
How can I solve
momory problem with big images?
Any help is greatly
appreciated.
Thanks.
G.
Kim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden