filestack / filestack-js

Official Javascript SDK for the Filestack API and content ingestion system.
https://www.filestack.com
MIT License
206 stars 76 forks source link

Black bar appears when force cropping jpgs #501

Open preid42 opened 1 year ago

preid42 commented 1 year ago

Expected Behavior

When I use force crop on a jpg with any width, I should get a cropped image without a black bar on the right side of the image.

Current Behavior

Currently when adding a jpg that has a width odd number width (example: 621x460), after the forced crop we're left with a black bar on the right side. This currently not only effects our use but also the example site for filestack as well.

Possible Solution

fix the way the calculation of the crop when adding jpgs with odd pixel width

Steps to Reproduce (for bugs)

  1. Add new image with an odd pixel width and force crop enabled
  2. Hit save to force crop image
  3. Image is now cropped with a black 1-2px black bar on the right

Additional Screenshots

  1. Adding new image that is 621x460 bolton-odd-width

  2. hit save to force crop

  3. Now see the black bar cropped

Context

Your Environment