Save Binary data.
lbates at syscononline.com
Fri Aug 19 16:58:22 CEST 2005
Images are binary data, don't do anything to them just save them
to files on disk in their binary format. The extra processing of
pickling them isn't going to help. Directories with large
numbers of files was a problem in FAT16 and FAT32 filesystems but
not really a problem in NTFS or Linux (at least that I've found).
Appending 100-200 images together into a single file will surely
cut down on the number of files. A lot depends on what the next
step in the process is expecting (e.g. individual files or a
a stream of data). If it is individual files, you will have to
split them back apart anyway so keeping them as individual files
is a benefit.
GMane Python wrote:
> Hello All.
> I have a program that downloads 'gigabytes' of Axis NetCam photos per day.
> Right now, I set up the process to put the images into a queue, and every 30
> or so seconds, 'pop' them from the queue and save them to disc. I save
> them as individual files.
> I think that I'd like to modify it to save into one file 100-200 images,
> so that I don't have directories with 50,000-90,000 frames before handing
> that off to a DivX Encoder.
> I don't know if I need to use something like cPickle, or maybe just save
> them as a binary data file (which would be a temp file until later in the
> day when I open it to begin the encoding process.)
> Can someone please help me with some direction?
> Thank you!
More information about the Python-list