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
1 changed files with 2 additions and 3 deletions

View File

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