Re: handling of huge bitmaps, incremental saving?
Re: handling of huge bitmaps, incremental saving?
- Subject: Re: handling of huge bitmaps, incremental saving?
- From: Sven Hoffmann <email@hidden>
- Date: Tue, 30 Dec 2003 12:56:48 +0200
thanks for the note, nicko, but it leaves me with a few questions.
On Tuesday, December 30, 2003, at 12:10 PM, Nicko van Someren wrote:
Processing drawings in strips is perfectly normal (postscript printers
do it all the time) and a good way to deal with your situation.
what about the saving as tiff? will cocoa, or better a machine with a
usual 256/512MB RAM, be able to handle
2 bitmap represantations (the on a drew into plus the tiff) each of a
size of agigabyte?
or can i do something like breaking the saving into strips as well, by
using one smaller bitmap,
draw into that, save it, draw into it, save it and so on?
You should be able to do it just by for each strip setting an
appropriate graphics context, translation offset and scaling factors
before drawing into the bitmap using your existing drawRect: code. If
you have millions of points you'd do well to make sure that the
drawing code takes note of the rectangle passed in and ignores objects
outside the drawn area.
the draing part seems sorted, just the saving is making me headaches,
but i guess i sshould just try and see...
sven
Nicko
On 29 Dec 2003, at 23:42, Sven Hoffmann wrote:
I am working on a little app for a graphic artist, which will result
in the
creation of bitmap data in the range of a gigabyte.
A few milion paths are drawn and they shall be saved as a tiff file
for printing.
the drawing goes fine, but so far i always draw into views, scaling
everything
to fit there.
Now i wonder what will happen when i try to draw to a NSBitmapImageRep
with data worth a gigabyte, then create another gigabyte for a
tiff-representation
from the first representation and then save the whole thing to disk.
A huge swapping orgy is to arise from that, no?
Is there maybe a way to to a bit of drawing, lets say a rect
containing an
eigth of the bitmap, save that to disk, do the next bit of drawing,
save and so on, with the result of a complete image file.
Is this just a dream of mine or is there a way to do something like
this?
Or maybe some other tricks to deal with huge bitmaps?
I thought i ask for some hints before trying to reinvent the wheel...
_______________________________________________
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.
_______________________________________________
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.