add my ‘create tinted image’ script
- ID
b35d161- date
2023-05-13 21:28:56+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
410a186- message
add my 'create tinted image' script- changed files
3 files, 20 additions, 1 deletion
Changed files
images/README.md (2411) → images/README.md (3059)
diff --git a/images/README.md b/images/README.md
index 0ef6c30..7525641 100644
--- a/images/README.md
+++ b/images/README.md
@@ -36,12 +36,31 @@ These scripts are for working with images and other visual material.
</dd>
<dt>
+ <a href="https://github.com/alexwlchan/scripts/blob/main/images/create_tinted_image">
+ <code>create_tinted_image [PATH] [HEX_COLOUR]</code>
+ </a>
+ </dt>
+ <dd>
+ take a greyscale image, and create a version which is tinted with the specified colour.
+ This works by creating an RGBA image which has the specified colour on every pixel, but controlling the intensity with the alpha value.
+ <p>
+ <table>
+ <tr>
+ <td><img src="examples/grayscale_circle.png"></td>
+ <td>→</td>
+ <td><img src="examples/grayscale_circle.ff0000.png"></td>
+ </tr>
+ </table>
+ </p>
+ </dd>
+
+ <dt>
<a href="https://github.com/alexwlchan/scripts/blob/main/images/images_only_pdf">
<code>images_only_pdf [PATH]</code>
</a>
</dt>
<dd>
- take a PDF, and create a new PDF whichb just has the images filling the page.
+ take a PDF, and create a new PDF which just has the images filling the page.
I use this to work around an odd behaviour of the “Scan Document” feature in Notes.app, where it adds a large white border around scanned images that I don’t want.
<p><strong>Note:</strong> this script overwrites the original file.</p>
</dd>
images/examples/grayscale_circle.ff0000.png (0) → images/examples/grayscale_circle.ff0000.png (5999)
diff --git a/images/examples/grayscale_circle.ff0000.png b/images/examples/grayscale_circle.ff0000.png
new file mode 100644
index 0000000..498d223
Binary files /dev/null and b/images/examples/grayscale_circle.ff0000.png differ
images/examples/grayscale_circle.png (0) → images/examples/grayscale_circle.png (9164)
diff --git a/images/examples/grayscale_circle.png b/images/examples/grayscale_circle.png
new file mode 100644
index 0000000..77332c3
Binary files /dev/null and b/images/examples/grayscale_circle.png differ