[Tutor] how to read and transmit/send only section of the image (sub-image)

Jojo Mwebaze jojo.mwebaze at gmail.com
Sat Sep 5 16:52:51 CEST 2009


oooh that will be helpful,  kindly point me to how i can begin with getting
a sub-image that has the same width as the
original. That will be my starting point.
Regards

Johnson





On Fri, Sep 4, 2009 at 3:56 PM, Kent Johnson <kent37 at tds.net> wrote:

> On Thu, Sep 3, 2009 at 6:01 PM, Jojo Mwebaze <jojo.mwebaze at gmail.com>
> wrote:
> > thanks guys,
> > Currently i am using pyfits, a bit slow cause loads the file in memory,
> > creates a subimage and then saves the file then transmits
> > the file over the network! My idea is,  if there is a way of creating a
> file
> > pointer to the location on disk, where the subimage lies, reading a
> specific
> > size, and  sending only the data read (like wayne had suggested)
> > Do you think this possible?
>
> Not by just reading a single portion of the file; even for an
> uncompressed bare raster image this would only work if the sub-image
> is the same width as the original. For a FITS file you also need to
> create a new header.
>
> It is technically possible to construct a subimage in memory without
> reading the original into memory but you would have to understand the
> details of the FITS format.
>
> You may be able to transmit the image without saving it first. Or
> perhaps one of the other FITS libs is faster.
>
> Kent
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090905/616ef723/attachment.htm>


More information about the Tutor mailing list