Skip to content

Commit

Permalink
Cleanup a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
kubilus1 committed Oct 8, 2023
1 parent ab0455b commit 7ba80e3
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions autoortho/getortho.py
Original file line number Diff line number Diff line change
Expand Up @@ -825,29 +825,6 @@ def get_best_chunk(self, col, row, mm, zoom):
return False


def _get_best_chunk(self, x, y, mm):
for i in range(mm+1, 5):
if i in self.imgs:
# We have an image already
img = self.imgs[i]

# Difference between requested mm and found image mm level
mmdiff = i - mm

mm4_x = x >> mmdiff
mm4_y = y >> mmdiff
scalefactor = 1 << mmdiff

mm_w = 256 >> mmdiff
mm_h = 256 >> mmdiff

log.debug(f"GET_IMG: {self} Crop: {mm4_x}x{mm4_y} w:{mm_w} h:{mm_h}")
crop_img = AoImage.new('RGBA', (mm_w, mm_h), (0,255,0))
img.crop(crop_img, (mm4_x, mm4_y))
chunk_img = crop_img.scale(scalefactor)
return chunk_img
return False

#@profile
@locked
def get_mipmap(self, mipmap=0):
Expand Down

0 comments on commit 7ba80e3

Please sign in to comment.