Don't crop if image isn't a GIF
This commit is contained in:
parent
2c60e404a4
commit
50ef9e51be
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ Napi::Value Caption(const Napi::CallbackInfo &info) {
|
|||
|
||||
vector<VImage> img;
|
||||
for (int i = 0; i < n_pages; i++) {
|
||||
VImage img_frame = in.crop(0, i * page_height, width, page_height);
|
||||
VImage img_frame = type == "gif" ? in.crop(0, i * page_height, width, page_height) : in;
|
||||
VImage frame = captionImage.join(img_frame,
|
||||
VIPS_DIRECTION_VERTICAL, VImage::option()
|
||||
->set("background", 0xffffff)
|
||||
|
|
Loading…
Reference in a new issue