Fix uncaption not cropping on non-gif images
This commit is contained in:
parent
3301fcebb8
commit
d2a1ffe2de
1 changed files with 2 additions and 3 deletions
|
@ -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));
|
||||||
|
|
Loading…
Reference in a new issue