-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Trim() cuts portions of the actual image #2363
Copy link
Copy link
Closed
Labels
Milestone
Description
Hi,
We are using the trim() function to get rid of extra white space around the image.
But there is a recent issue we noticed. Trim() removes the portion of the image. Please find the attached screenshots of the actual image and the image after using Trim().
Note that the dot in the end of the first line gets cut. (after answer, see that portion of 'r' in answer along with the ending fullstop gets cut)
The code that I use is as follows.
sharp(buffer).trim()
Have tried giving threshold for trim with values like 1, 5 12 etc but nothing works. Have tried resize but that does not do the trimming .Please suggest if there is anyother work around to this.
Reactions are currently unavailable

