Re: Large view to NSBitmapImageRep
Re: Large view to NSBitmapImageRep
- Subject: Re: Large view to NSBitmapImageRep
- From: Marco Binder <email@hidden>
- Date: Thu, 1 May 2003 14:57:00 +0200
Hi,
1) initWithFocusedViewRect shuld work. I wouldnt see why not. Lock the
focus on the view and init the NSBitmapRep with
initWithFocusedViewRect:[focusedView bounds]...
2) If you go via PDF, which you really shouldnt have to, you can simply
get the TIFFRepresentation and use that to initialize an
NSBitmapImageRep via initWithData:
3) I cant imagine, that 2000x4000 pixels is too big for an NSImage to
hold. I wouldnt swear tho... Simply drawing in an image should work,
too, I d guess, then getting the TIFFRep and use that to init an
NSBitmapImageRep.
If nothing works, you might want to show us some code...
Marco
Am Donnerstag, 01.05.03 um 13:46 Uhr schrieb Gideon King:
I am trying to get a very large view (2000x4000 pixels) into an
NSBitmapimageRep - the view is in a scrollview, so I can't get the
full image with initWithFocusedViewRect as I just get the bit that's
displayed on screen.
I can get the PDF data using dataWithPDFInsideRect, but I'm not sure
how to turn that into an NSBitmapImageRep - all the methods I've tried
go through the cache mechanism somewhere along the way, and I get the
message "can't cache image". If I create an image and add a pdf rep
that has been created from the data and try to get the tiff
representation to create a bitmap rep with the image data, the tiff
representation is empty.
I have tried to create an image, lock focus on it and draw the view
into it, but that creates a cached image rep, which won't cache
because it is too big. I have tried setting data retained to YES, but
that still doesn't seem to help.
From the posts on the list, I see people have discussed some of the
same issues before, but there doesn't seem to be an answer that works
with large images, so any suggestions would be greatly appreciated.
Thanks
Gideon
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
--
|\ /| email@hidden
http://www.marco-binder.de
| \/ | Telefon: 07531 / 94 19 94 Fax: 07531 / 94 19 92
| |ARCO Snail-Mail: Banater Str. 3 - 78467 Konstanz
BINDER _____________________________________________________
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.