ojii / pymaging

Pure Python imaging library with Python 2.6, 2.7, 3.1+ support

Home Page:http://pymaging.rtfd.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Up-resizing doesn't work (nearest neighbor)

craigds opened this issue · comments

I added a test case to resize up (2x2 to 4x4) and got this:

ERROR: test_resize_nearest_resampling_up (pymaging.tests.test_resampling.ResizeNearestResamplingTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/cdestigter/checkout/pymaging/pymaging/tests/test_resampling.py", line 23, in test_resize_nearest_resampling_up
    img = img.resize(4, 4)
  File "/Users/cdestigter/checkout/pymaging/pymaging/image.py", line 101, in resize
    pixels = resample_algorithm(self, width, height, self.pixelsize)
  File "/Users/cdestigter/checkout/pymaging/pymaging/resample.py", line 46, in nearest
    lineextend(source.pixels[source_y][source_x_start:source_x_end])
IndexError: list index out of range

Fix forthcoming