Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSImage data size restriction?



Hello,

I'm having trouble creating a NSImage from data returned by - NSView
dataWithPDFInsideRect:. The data is fine but I can't create a NSImage
from it, or NSBitmapImageRep for that matter. When I try

NSImage *masterImage = [[NSImage alloc] initWithData: imageData];

masterImage is nil. If the PDF data is smaller it works fine. There
seems to be a point at which NSImage and fam can't/refuses to make an
image from.
I've tried writing the NSData to disk and it comes out fine, the file
is 40KB and it's all there.
Out of curiosity I logged the length of the data: 37917.

I could get the PDF data in pieces and make several NSImages but I
need it all in one NSImage. I could get it in pieces and then
composite the pieces into a full-size image but that is a last resort,
and I haven't tested it so I'm not positive it will work.

If the solution, whatever it may be, works on 10.3 that would be best.

Has anyone else had this problem?

Peace, Alan


-- // Quotes from yours truly ------------------------- "You don't forget, you just don't remember." "Maturity resides in the mind." "Silence is the Universe's greatest gift." "When the World realizes that religion really is unnecessary, then it shall evolve." _______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.