8000 Fix EDGE_WRAP overwriting X with Y when Y < 0 by sjoerdthedev · Pull Request #956 · jimp-dev/jimp · GitHub
[go: up one dir, main page]

Skip to content

Fix EDGE_WRAP overwriting X with Y when Y < 0 - #956

Closed
sjoerdthedev wants to merge 1 commit into
jimp-dev:masterfrom
sjoerdthedev:master
Closed

sjoerdthedev wants to merge 1 commit into
jimp-dev:masterfrom
sjoerdthedev:master

Conversation

@sjoerdthedev
@sjoerdthedev sjoerdthedev commented Oct 23, 2020 •
Copy link
Copy Markdown
Member

What's Changing and Why

The getPixelAt code in the Jimp core seems to be doing the wrong thing when EdgeHandling is set to EDGE_WRAP. When y is lower than zero, it assigns the wrapped y value to xi instead of yi, resulting in distorted output. This pull request changes the variable assignment to the correct value. I've updated the corresponding test as well so that the buffers match during the test.

What else might be affected

Any code that uses edge wrap may see different output in cases where the image is sampled on the negative Y axis.

Tasks

  • Add tests
  • Update Documentation
  • Update jimp.d.ts
  • Add SemVer Label
📦 Published PR as canary version: 0.16.2-canary.956.1095.0

✨ Test out this PR locally via:

npm install @jimp/cli@0.16.2-canary.956.1095.0
npm install @jimp/core@0.16.2-canary.956.1095.0
npm install @jimp/custom@0.16.2-canary.956.1095.0
npm install jimp@0.16.2-canary.956.1095.0
npm install @jimp/plugin-blit@0.16.2-canary.956.1095.0
npm install @jimp/plugin-blur@0.16.2-canary.956.1095.0
npm install @jimp/plugin-circle@0.16.2-canary.956.1095.0
npm install @jimp/plugin-color@0.16.2-canary.956.1095.0
npm install @jimp/plugin-contain@0.16.2-canary.956.1095.0
npm install @jimp/plugin-cover@0.16.2-canary.956.1095.0
npm install @jimp/plugin-crop@0.16.2-canary.956.1095.0
npm install @jimp/plugin-displace@0.16.2-canary.956.1095.0
npm install @jimp/plugin-dither@0.16.2-canary.956.1095.0
npm install @jimp/plugin-fisheye@0.16.2-canary.956.1095.0
npm install @jimp/plugin-flip@0.16.2-canary.956.1095.0
npm install @jimp/plugin-gaussian@0.16.2-canary.956.1095.0
npm install @jimp/plugin-invert@0.16.2-canary.956.1095.0
npm install @jimp/plugin-mask@0.16.2-canary.956.1095.0
npm install @jimp/plugin-normalize@0.16.2-canary.956.1095.0
npm install @jimp/plugin-print@0.16.2-canary.956.1095.0
npm install @jimp/plugin-resize@0.16.2-canary.956.1095.0
npm install @jimp/plugin-rotate@0.16.2-canary.956.1095.0
npm install @jimp/plugin-scale@0.16.2-canary.956.1095.0
npm install @jimp/plugin-shadow@0.16.2-canary.956.1095.0
npm install @jimp/plugin-threshold@0.16.2-canary.956.1095.0
npm install @jimp/plugins@0.16.2-canary.956.1095.0
npm install @jimp/test-utils@0.16.2-canary.956.1095.0
npm install @jimp/bmp@0.16.2-canary.956.1095.0
npm install @jimp/gif@0.16.2-canary.956.1095.0
npm install @jimp/jpeg@0.16.2-canary.956.1095.0
npm install @jimp/png@0.16.2-canary.956.1095.0
npm install @jimp/tiff@0.16.2-canary.956.1095.0
npm install @jimp/types@0.16.2-canary.956.1095.0
npm install @jimp/utils@0.16.2-canary.956.1095.0
# or 
yarn add @jimp/cli@0.16.2-canary.956.1095.0
yarn add @jimp/core@0.16.2-canary.956.1095.0
yarn add @jimp/custom@0.16.2-canary.956.1095.0
yarn add jimp@0.16.2-canary.956.1095.0
yarn add @jimp/plugin-blit@0.16.2-canary.956.1095.0
yarn add @jimp/plugin-blur@0.16.2-canary.956.1095.0
yarn add @jimp/plugin-circle@0.16.2-canary.956.1095.0
yarn add @jimp/plugin-color@0.16.2-canary.956.1095.0
yarn add @jimp/plugin-contain@0.16.2-canary.956.1095.0
yarn add @jimp/plugin-cover@0.16.2-canary.956.1095.0
yarn add @jimp/plugin-crop@0.16.2-canary.956.1095.0
yarn add @jimp/plugin-displace@0.16.2-canary.956.1095.0
yarn add @jimp/plugin-dither@0.16.2-canary.956.1095.0
yarn add @jimp/plugin-fisheye@0.16.2-canary.956.1095.0
yarn add @jimp/plugin-flip@0.16.2-canary.956.1095.0
yarn add @jimp/plugin-gaussian@0.16.2-canary.956.1095.0
yarn add @jimp/plugin-invert@0.16.2-canary.956.1095.0
yarn add @jimp/plugin-mask@0.16.2-canary.956.1095.0
yarn add @jimp/plugin-normalize@0.16.2-canary.956.1095.0
yarn add @jimp/plugin-print@0.16.2-canary.956.1095.0
yarn add @jimp/plugin-resize@0.16.2-canary.956.1095.0
yarn add @jimp/plugin-rotate@0.16.2-canary.956.1095.0
yarn add @jimp/plugin-scale@0.16.2-canary.956.1095.0
yarn add @jimp/plugin-shadow@0.16.2-canary.956.1095.0
yarn add @jimp/plugin-threshold@0.16.2-canary.956.1095.0
yarn add @jimp/plugins@0.16.2-canary.956.1095.0
yarn add @jimp/test-utils@0.16.2-canary.956.1095.0
yarn add @jimp/bmp@0.16.2-canary.956.1095.0
yarn add @jimp/gif@0.16.2-canary.956.1095.0
yarn add @jimp/jpeg@0.16.2-canary.956.1095.0
yarn add @jimp/png@0.16.2-canary.956.1095.0
yarn add @jimp/tiff@0.16.2-canary.956.1095.0
yarn add @jimp/types@0.16.2-canary.956.1095.0
yarn add @jimp/utils@0.16.2-canary.956.1095.0

@hipstersmoothie
Copy link
Copy Markdown
Collaborator

closed in favor of #1135

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0