-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: rxvt-unicode-sixel
action: commit
revision:
path_from:
revision_from: 8878a3e13db20153ee171063ba181a584be9c43b:
path_to:
revision_to:

git.thebackupbox.net

rxvt-unicode-sixel

git://git.thebackupbox.net/rxvt-unicode-sixel

commit 8878a3e13db20153ee171063ba181a584be9c43b
Author: Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
Date:   Sun May 20 16:34:42 2012 +0000

    Remove arbitrary limit of 1000 on scaling factors and limit the maximum
    width/height of a scaled image to 32767.

diff --git a/doc/rxvt.1.pod b/doc/rxvt.1.pod

index 984a03a16a4312ed429621498ddb0a296e26f0ea..

index ..95d97fa69fb824329605f6a2c203be13e232eb0f 100644

--- a/doc/rxvt.1.pod
+++ b/doc/rxvt.1.pod
@@ -744,7 +744,7 @@ Supported operations are:

 sets scale and position. B<"W" / "H"> specify the horizontal/vertical
 scale (percent), and B<"X" / "Y"> locate the image centre (percent). A
-scale of 0 disables scaling. The maximum permitted scale is 1000.
+scale of 0 disables scaling.

 =item B<op=tile>

diff --git a/src/background.C b/src/background.C

index 12295e235ea8e112ba38ba237e333e2fcfd7e5a8..

index ..1af80537d5d4d205c48859e676eca66ea97124f8 100644

--- a/src/background.C
+++ b/src/background.C
@@ -276,8 +276,6 @@ rxvt_image::set_geometry (const char *geom, bool update)
         w = h;
     }

-  min_it (w, 1000);
-  min_it (h, 1000);
   clamp_it (x, -100, 200);
   clamp_it (y, -100, 200);

@@ -312,9 +310,11 @@ rxvt_term::get_image_geometry (rxvt_image &image, int &w, int &h, int &x, int &y
   int image_height = image.height ();
   int target_width = szHint.width;
   int target_height = szHint.height;
+  int h_scale = min (image.h_scale, 32767 * 100 / target_width);
+  int v_scale = min (image.v_scale, 32767 * 100 / target_height);

-  w = image.h_scale * target_width / 100;
-  h = image.v_scale * target_height / 100;
+  w = h_scale * target_width / 100;
+  h = v_scale * target_height / 100;

   if (image.flags & IM_KEEP_ASPECT)
     {

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 14:03:40 2024