On Thu, Sep 3, 2009 at 8:05 AM, Jojo Mwebaze <jojo.mweb...@gmail.com> wrote:
> Hello Tutor > > I am writing Class to provide data transfer between the server and client > processes based on simple HTTP GET/POST operations. However my interest is a > sub-image (section of a full image). i am requesting help on how to read and > transmit/send only section of the image (sub-image). i also prefer read the > bytes (of the subimage) off the disk, without opening the file into memory! > > The images i work with are of type FITS. > The biggest problem is that image files usually have header information in the file that tell what the file type is, how big it is, and that sort of thing. I've never used FITS images though, so I don't know that much about them. I'm not sure how the python open works, if it loads the file into memory or if it just creates a file pointer to the location on disk. AFAIK it's the latter, in which case opening the file and seeking to the correct place, reading a specific size, and saving that data would be all you need to do. HTH, Wayne
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor