From 7a76609e70df751469e952cb0d4dcfe739cce7f7 Mon Sep 17 00:00:00 2001 From: murm Date: Sun, 19 Mar 2023 05:12:58 -0400 Subject: [PATCH] minor fixes to the natives --- commands/image-editing/globe.js | 4 ++++ natives/caption.cc | 2 +- natives/caption2.cc | 2 +- natives/colors.cc | 2 +- natives/gamexplain.cc | 2 +- natives/globe.cc | 2 +- natives/homebrew.cc | 4 ++-- natives/invert.cc | 2 +- natives/motivate.cc | 4 ++-- natives/scott.cc | 4 ++-- 10 files changed, 16 insertions(+), 12 deletions(-) diff --git a/commands/image-editing/globe.js b/commands/image-editing/globe.js index ed93271..a09a168 100644 --- a/commands/image-editing/globe.js +++ b/commands/image-editing/globe.js @@ -5,6 +5,10 @@ class GlobeCommand extends ImageCommand { static description = "Spins an image"; static aliases = ["sphere"]; + params = { + togif: true + }; + static noImage = "You need to provide an image/GIF to spin!"; static command = "globe"; } diff --git a/natives/caption.cc b/natives/caption.cc index 6de162f..64134e0 100644 --- a/natives/caption.cc +++ b/natives/caption.cc @@ -76,7 +76,7 @@ ArgumentMap Caption(string type, string *outType, char *BufferData, ArgumentMap output; output["buf"] = (char *)buf; output["width"] = final.width(); - output["height"] = vips_image_get_page_height(in.get_image()); + output["height"] = vips_image_get_page_height(final.get_image()); return output; } diff --git a/natives/caption2.cc b/natives/caption2.cc index 58077ab..123ed4c 100644 --- a/natives/caption2.cc +++ b/natives/caption2.cc @@ -80,7 +80,7 @@ ArgumentMap CaptionTwo(string type, string *outType, char *BufferData, ArgumentMap output; output["buf"] = (char *)buf; output["width"] = final.width(); - output["height"] = vips_image_get_page_height(in.get_image()); + output["height"] = vips_image_get_page_height(final.get_image()); return output; } diff --git a/natives/colors.cc b/natives/colors.cc index 7f3536d..2345e81 100644 --- a/natives/colors.cc +++ b/natives/colors.cc @@ -35,7 +35,7 @@ ArgumentMap Colors(string type, string *outType, char *BufferData, ArgumentMap output; output["buf"] = (char *)buf; output["width"] = out.width(); - output["height"] = vips_image_get_page_height(in.get_image()); + output["height"] = vips_image_get_page_height(out.get_image()); return output; } diff --git a/natives/gamexplain.cc b/natives/gamexplain.cc index 5cf10ab..2b8c025 100644 --- a/natives/gamexplain.cc +++ b/natives/gamexplain.cc @@ -49,7 +49,7 @@ ArgumentMap Gamexplain(string type, string *outType, char *BufferData, ArgumentMap output; output["buf"] = (char *)buf; output["width"] = final.width(); - output["height"] = vips_image_get_page_height(in.get_image()); + output["height"] = vips_image_get_page_height(final.get_image()); return output; } \ No newline at end of file diff --git a/natives/globe.cc b/natives/globe.cc index db1ff04..1a0c500 100644 --- a/natives/globe.cc +++ b/natives/globe.cc @@ -72,7 +72,7 @@ ArgumentMap Globe(string type, string *outType, char *BufferData, size_t BufferL ArgumentMap output; output["buf"] = (char *)buf; output["width"] = final.width(); - output["height"] = vips_image_get_page_height(in.get_image()); + output["height"] = vips_image_get_page_height(final.get_image()); return output; } \ No newline at end of file diff --git a/natives/homebrew.cc b/natives/homebrew.cc index b31af3b..2425c9a 100644 --- a/natives/homebrew.cc +++ b/natives/homebrew.cc @@ -35,8 +35,8 @@ ArgumentMap Homebrew(string type, string *outType, ArgumentMap Arguments, ArgumentMap output; output["buf"] = (char *)buf; - output["width"] = bg.width(); - output["height"] = vips_image_get_page_height(bg.get_image()); + output["width"] = out.width(); + output["height"] = vips_image_get_page_height(out.get_image()); return output; } \ No newline at end of file diff --git a/natives/invert.cc b/natives/invert.cc index 24ec1a5..06360a6 100644 --- a/natives/invert.cc +++ b/natives/invert.cc @@ -27,7 +27,7 @@ ArgumentMap Invert(string type, string *outType, char *BufferData, ArgumentMap output; output["buf"] = (char *)buf; output["width"] = out.width(); - output["height"] = vips_image_get_page_height(in.get_image()); + output["height"] = vips_image_get_page_height(out.get_image()); return output; } \ No newline at end of file diff --git a/natives/motivate.cc b/natives/motivate.cc index 242ef6d..f819918 100644 --- a/natives/motivate.cc +++ b/natives/motivate.cc @@ -121,8 +121,8 @@ ArgumentMap Motivate(string type, string *outType, char *BufferData, ArgumentMap output; output["buf"] = (char *)buf; - output["width"] = in.width(); - output["height"] = vips_image_get_page_height(in.get_image()); + output["width"] = final.width(); + output["height"] = vips_image_get_page_height(final.get_image()); return output; } diff --git a/natives/scott.cc b/natives/scott.cc index 5847196..500858d 100644 --- a/natives/scott.cc +++ b/natives/scott.cc @@ -54,8 +54,8 @@ ArgumentMap Scott(string type, string *outType, char *BufferData, size_t BufferL ArgumentMap output; output["buf"] = (char *)buf; - output["width"] = width; - output["height"] = pageHeight; + output["width"] = final.width(); + output["height"] = vips_image_get_page_height(final.get_image()); return output; } \ No newline at end of file