Ticket #233 (closed enhancement: fixed)

Opened 12 years ago

Last modified 12 years ago

Improve time performance of subimage methods

Reported by: melissa Owned by: melissa
Priority: trivial Milestone:
Component: bio-formats Severity: minor
Keywords: Cc:
Blocked By: Blocking:


The majority of openBytes(int, byte[], int, int, int, int) implementations look like this:

skip to first row of subimage

for each row in subimage {
  skip to first column of subimage
  read <width of subimage> bytes
  skip <width of image> - <width of subimage> - <first column> bytes

If the subimage is nearly the same size as the full image, it may be faster to read the full image and crop as needed. We need to perform some tests to determine when cropping is faster than reading row-by-row, and improve the subimage logic as necessary.

Change History

comment:1 Changed 12 years ago by curtis

  • Priority changed from minor to trivial

comment:2 Changed 12 years ago by melissa

  • Status changed from new to closed
  • Resolution set to fixed

There doesn't appear to be an appreciable difference between reading row-by-row and reading the entire plane and cropping. Tested on 3 channel, 16 bits per channel images - 4096x4096, 1024x1024, and 512x512.

Note: See TracTickets for help on using tickets.