You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using bimg to extract areas from images and then resize them, however I get a bad extract area from libvips when trying to perform this operation, which according to the source is thrown when the extra area extends outside the bounds of the image, which after checking the values, is not the case.
Size of the image reported by bimg: {Width:4608 Height:3456}
Options passed to (*bimg.image).Process:
So I've realised now what is actually causing the issue.
Because the (*bimg.Image).Size() function (or rather the associated libvips function) is getting the dimensions from the format-specific file header, it doesn't take into account the possibility of an EXIF orientation flag. However this flag is taken into account when determining if the area specified for an extract operation is valid, and where that area is.
Will look into this further but may submit a PR to add another func which gets the dimensions with the EXIF orientation applied if this resolves the issue.
I'm using bimg to extract areas from images and then resize them, however I get a bad extract area from libvips when trying to perform this operation, which according to the source is thrown when the extra area extends outside the bounds of the image, which after checking the values, is not the case.
Size of the image reported by bimg:
{Width:4608 Height:3456}
Options passed to
(*bimg.image).Process
:Code sample:
Any ideas why I'm getting this error when my values show I'm not asking for any area outside the image?
The text was updated successfully, but these errors were encountered: