Jump to content

aaronprime

Members
  • Content count

    2
  • Joined

  • Last visited

  1. aaronprime

    Resample algorithm bug

    Thanks for checking. It looks like the issue may only be with the UI scaling of the image view and not the image itself. I noticed that at different document zoom levels the shifting corrects itself. I have attached a 512px image. You can see in the second screenshot after resizing to 2048px a line of transparency is introduced to the left of the image. But I can then adjust the document zoom level to make that disappear. Use Alt+Middle Mouse to scale the view and you'll see it flashing and shifting. Given this appears to only be an issue in the UI, it isn't as serious as I first thought, though it makes editing a bit squirrely. I also tested in other popular apps with the same file and did not reproduce the issue so it does seem to be correctable. Test-512px.afphoto
  2. aaronprime

    Resample algorithm bug

    All of the resample implementations you're using for resize suffer from a common bug of either not taking half pixel offsets into account or not using a clamp operation at the edges. This results in the document being shifted by a pixel in each direction after the resample. This can be verified on a transparent image with a black border at the left and top edges. After a resample you'll see that your algorithm introduces transparency along those edges and shifts the content.
×