Fix uncaption not cropping on non-gif images

This commit is contained in:
Essem 2022-06-01 12:34:23 -05:00
parent 3301fcebb8
commit d2a1ffe2de
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C

View file

@ -38,9 +38,8 @@ Napi::Value Uncaption(const Napi::CallbackInfo &info) {
vector<VImage> img; vector<VImage> img;
for (int i = 0; i < n_pages; i++) { for (int i = 0; i < n_pages; i++) {
VImage img_frame = type == "gif" ? in.crop(0, (i * page_height) + top, VImage img_frame =
width, page_height - top) in.crop(0, (i * page_height) + top, width, page_height - top);
: in;
img.push_back(img_frame); img.push_back(img_frame);
} }
VImage final = VImage::arrayjoin(img, VImage::option()->set("across", 1)); VImage final = VImage::arrayjoin(img, VImage::option()->set("across", 1));