> 
> 
> 
> John Francis wrote:
> 
> 
> > not to display some of the pixels if they were available, and there's
> > no reasonable way to get some of the pixels from an image without
> > getting all of them (except, as noted, if it were a progressive JPEG).
> > 
> 
> how is that?
> you can give an order to address and read every 4th pixel from file..

No you can't.  You have to read all the pixels into memory.  If you
then choose to ignore 3/4 of them that's your choice, but you've
still transferred all of them over the slow datapath (external media
to local memory), which is where most of the time is spent.
(You can, of course, start reading at the top row of your zoomed-in
view of the image, and stop reading once you've got to the bottom row.
But you're going to have to read all the pixels on each of those rows,
including the ones off-sceen to the left or right of your chosen view)

> what do you think modern databases work like where ypou can get desired 
> bits from huge file in seconds if the file is indexed??

Database indices do a lot more than just calculate record offsets. But
they have a memory-resident table that tells them which of the blocks
to read in from the (slow) external media in order to get the record
they want.  The index just stops them having to read every one of the
many millions of records in sequence (and perform certain simple checks);
once they get a record they will read all of it.
 
> though to be faster or more reasonable compared to readin everything the 
> gap should not be every 4th pixel, but much wider..

Yes.  Much, *much* wider.  Larger than the block size of the storage
media, which is never going to be the case for these image files.
 
> i guess
> 
> viljar

Reply via email to