-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
237f721
commit 483fe1e
Showing
28 changed files
with
541 additions
and
285 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,7 @@ | |
CLASS HIERARCHY | ||
<a href="./named-object_lisp.html#robo13">named-object</a> -> <strong>image</strong> | ||
|
||
$$ Last modified: 22:30:50 Wed Apr 24 2024 CEST | ||
$$ Last modified: 00:56:13 Thu Jun 27 2024 CEST | ||
</pre> | ||
|
||
<hr /> | ||
|
@@ -95,8 +95,8 @@ | |
<pre> The (modified) dest <a href="#robo11">image</a> object. | ||
</pre> | ||
<p class="item_name">EXAMPLE</p> | ||
<pre class="source">(let ((img1 (<a href="#robo47">make-rgb-image</a> 200 300)) | ||
(img2 (<a href="#robo47">make-rgb-image</a> 30 30 :initial-color (make-color 20 90 111)))) | ||
<pre class="source">(let ((img1 (<a href="#robo48">make-rgb-image</a> 200 300)) | ||
(img2 (<a href="#robo48">make-rgb-image</a> 30 30 :initial-color (make-color 20 90 111)))) | ||
(<strong>copy</strong> img1 img2 :height 10 :width 10 | ||
:dest-x 20 :dest-y 25)) | ||
;;; => | ||
|
@@ -115,9 +115,53 @@ | |
width height) | ||
</pre> | ||
|
||
<hr /> | ||
<a name="image2fcrop"></a> | ||
<a name="robo44"></a><h2>image/crop [ Methods ]</h2> | ||
|
||
<p>[ <a href="#robo_top_of_doc">Top</a> ] [ <a href="#robo11">image</a> ] [ <a href="./robo_methods.html#robo_top_of_doc">Methods</a> ]</p> | ||
<p class="item_name">AUTHOR</p> | ||
<pre> Ruben Philipp <[email protected]> | ||
</pre> | ||
<p class="item_name">CREATED</p> | ||
<pre> 2024-06-27 | ||
</pre> | ||
<p class="item_name">DESCRIPTION</p> | ||
<pre> Crop an <a href="#robo11">image</a> object according to the given pixel coordinates. | ||
</pre> | ||
<p class="item_name">ARGUMENTS</p> | ||
<pre> - The <a href="#robo11">image</a> object | ||
- x | ||
- y | ||
- width | ||
- height | ||
</pre> | ||
<p class="item_name">RETURN VALUE</p> | ||
<pre> The cropped <a href="#robo11">image</a> obj. | ||
</pre> | ||
<p class="item_name">EXAMPLE</p> | ||
<pre class="source">;;; remove a border from images | ||
(let* ((images (<a href="./utilities_lisp.html#robo75">files-from-dir</a> (<a href="./utilities_lisp.html#robo82">path-from-same-dir</a> "img/") :pattern "*.png")) | ||
;; cut coords | ||
(x 177) | ||
(y 119) | ||
(outdir "/tmp/praat/")) | ||
(ensure-directories-exist outdir) | ||
(loop for <a href="#robo11">image</a> in images | ||
for img = (make-<a href="#robo11">image</a>-from-png (namestring <a href="#robo11">image</a>)) | ||
do | ||
(<strong>crop</strong> img x y (- (width img) (* 2 x)) (- (height img) (* 2 y))) | ||
(<a href="./canvas_lisp.html#robo21">write-png</a> img :outfile (concatenate 'string | ||
outdir | ||
(file-namestring <a href="#robo11">image</a>))))) | ||
</pre> | ||
<p class="item_name">SYNOPSIS</p> | ||
<pre class="source">(defmethod <strong>crop</strong> ((img <a href="#robo11">image</a>) x y width height) | ||
</pre> | ||
|
||
<hr /> | ||
<a name="image2fmake2dimage"></a> | ||
<a name="robo44"></a><h2>image/make-image [ Functions ]</h2> | ||
<a name="robo45"></a><h2>image/make-image [ Functions ]</h2> | ||
|
||
<p>[ <a href="#robo_top_of_doc">Top</a> ] [ <a href="#robo11">image</a> ] [ <a href="./robo_functions.html#robo_top_of_doc">Functions</a> ]</p> | ||
<p class="item_name">AUTHOR</p> | ||
|
@@ -150,7 +194,7 @@ | |
|
||
<hr /> | ||
<a name="image2fmake2dimage2dfrom2dfile"></a> | ||
<a name="robo45"></a><h2>image/make-image-from-file [ Methods ]</h2> | ||
<a name="robo46"></a><h2>image/make-image-from-file [ Methods ]</h2> | ||
|
||
<p>[ <a href="#robo_top_of_doc">Top</a> ] [ <a href="#robo11">image</a> ] [ <a href="./robo_methods.html#robo_top_of_doc">Methods</a> ]</p> | ||
<p class="item_name">AUTHOR</p> | ||
|
@@ -184,7 +228,7 @@ | |
|
||
<hr /> | ||
<a name="image2fmake2dimage2dfrom2dsvg"></a> | ||
<a name="robo46"></a><h2>image/make-image-from-svg [ Functions ]</h2> | ||
<a name="robo47"></a><h2>image/make-image-from-svg [ Functions ]</h2> | ||
|
||
<p>[ <a href="#robo_top_of_doc">Top</a> ] [ <a href="#robo11">image</a> ] [ <a href="./robo_functions.html#robo_top_of_doc">Functions</a> ]</p> | ||
<p class="item_name">AUTHOR</p> | ||
|
@@ -203,8 +247,8 @@ | |
<p class="item_name">OPTIONAL ARGUMENTS</p> | ||
<pre> keyword-arguments: | ||
- :id. The id of the new <a href="#robo11">image</a> object. | ||
- :width. The width of the <a href="#robo11">image</a> (in px). Cf. <a href="./svg_lisp.html#robo66">svg->png</a>. | ||
- :height. The height of the <a href="#robo11">image</a> (in px). Cf. <a href="./svg_lisp.html#robo66">svg->png</a>. | ||
- :width. The width of the <a href="#robo11">image</a> (in px). Cf. <a href="./svg_lisp.html#robo67">svg->png</a>. | ||
- :height. The height of the <a href="#robo11">image</a> (in px). Cf. <a href="./svg_lisp.html#robo67">svg->png</a>. | ||
- :tmp-dir. A path to a directory where the temp-files are stored. | ||
Default = (<a href="./globals_lisp.html#robo37">get-apr-config</a> :default-tmp-dir) | ||
- :default-interpolation. The default interpolation method (used e.g. when | ||
|
@@ -213,7 +257,7 @@ | |
</pre> | ||
<p class="item_name">RETURN VALUE</p> | ||
<p class="item_name">EXAMPLE</p> | ||
<pre class="source">(let ((<a href="./canvas_lisp.html#robo9">canvas</a> (cl-<a href="./svg_lisp.html#robo7">svg</a>::<a href="./svg_lisp.html#robo65">make-svg-toplevel</a> 'cl-<a href="./svg_lisp.html#robo7">svg</a>:<a href="./svg_lisp.html#robo7">svg</a>-1.1-toplevel | ||
<pre class="source">(let ((<a href="./canvas_lisp.html#robo9">canvas</a> (cl-<a href="./svg_lisp.html#robo7">svg</a>::<a href="./svg_lisp.html#robo66">make-svg-toplevel</a> 'cl-<a href="./svg_lisp.html#robo7">svg</a>:<a href="./svg_lisp.html#robo7">svg</a>-1.1-toplevel | ||
:width 400 | ||
:height 300)) | ||
(<a href="#robo11">image</a> nil)) | ||
|
@@ -222,8 +266,8 @@ | |
:width 100 :height (* 100 4/3) | ||
:fill "rgba(90,90,90,1)")) | ||
(setf <a href="#robo11">image</a> (<strong>make-image-from-svg</strong> <a href="./canvas_lisp.html#robo9">canvas</a>)) | ||
(<a href="#robo51">write-png</a> <a href="#robo11">image</a> :outfile "/tmp/<a href="#robo11">image</a>.png") | ||
(<a href="./utilities_lisp.html#robo90">system-open-file</a> "/tmp/<a href="#robo11">image</a>.png")) | ||
(<a href="./canvas_lisp.html#robo21">write-png</a> <a href="#robo11">image</a> :outfile "/tmp/<a href="#robo11">image</a>.png") | ||
(<a href="./utilities_lisp.html#robo95">system-open-file</a> "/tmp/<a href="#robo11">image</a>.png")) | ||
</pre> | ||
<p class="item_name">SYNOPSIS</p> | ||
<pre class="source">(defun <strong>make-image-from-svg</strong> (<a href="./svg_lisp.html#robo7">svg</a> &key | ||
|
@@ -237,7 +281,7 @@ | |
|
||
<hr /> | ||
<a name="image2fmake2drgb2dimage"></a> | ||
<a name="robo47"></a><h2>image/make-rgb-image [ Functions ]</h2> | ||
<a name="robo48"></a><h2>image/make-rgb-image [ Functions ]</h2> | ||
|
||
<p>[ <a href="#robo_top_of_doc">Top</a> ] [ <a href="#robo11">image</a> ] [ <a href="./robo_functions.html#robo_top_of_doc">Functions</a> ]</p> | ||
<p class="item_name">AUTHOR</p> | ||
|
@@ -277,7 +321,7 @@ | |
|
||
<hr /> | ||
<a name="image2fresize"></a> | ||
<a name="robo48"></a><h2>image/resize [ Methods ]</h2> | ||
<a name="robo49"></a><h2>image/resize [ Methods ]</h2> | ||
|
||
<p>[ <a href="#robo_top_of_doc">Top</a> ] [ <a href="#robo11">image</a> ] [ <a href="./robo_methods.html#robo_top_of_doc">Methods</a> ]</p> | ||
<p class="item_name">AUTHOR</p> | ||
|
@@ -303,7 +347,7 @@ | |
<pre> The modified <a href="#robo11">image</a> object. | ||
</pre> | ||
<p class="item_name">EXAMPLE</p> | ||
<pre class="source">(let ((img (<a href="#robo47">make-rgb-image</a> 200 300))) | ||
<pre class="source">(let ((img (<a href="#robo48">make-rgb-image</a> 200 300))) | ||
(<strong>resize</strong> img 400 400)) | ||
;;; => | ||
IMAGE: width: 400, height: 400 | ||
|
@@ -318,7 +362,7 @@ | |
|
||
<hr /> | ||
<a name="image2fscale"></a> | ||
<a name="robo49"></a><h2>image/scale [ Methods ]</h2> | ||
<a name="robo50"></a><h2>image/scale [ Methods ]</h2> | ||
|
||
<p>[ <a href="#robo_top_of_doc">Top</a> ] [ <a href="#robo11">image</a> ] [ <a href="./robo_methods.html#robo_top_of_doc">Methods</a> ]</p> | ||
<p class="item_name">AUTHOR</p> | ||
|
@@ -345,13 +389,13 @@ | |
<pre> The modified <a href="#robo11">image</a> object. | ||
</pre> | ||
<p class="item_name">EXAMPLE</p> | ||
<pre class="source">(let ((img (<a href="#robo47">make-rgb-image</a> 200 300))) | ||
(<strong>scale</strong> img 1.5 2.0)) | ||
;;; => | ||
IMAGE: width: 300, height: 600 | ||
NAMED-OBJECT: id: NIL, tag: NIL, | ||
data: #<RGB-IMAGE (300x600) {7006A8E413}> | ||
********** | ||
<pre class="source">(let ((img (<a href="#robo48">make-rgb-image</a> 200 300))) ; ; ; ; | ||
(<strong>scale</strong> img 1.5 2.0)) ; ; ; ; | ||
;;; => ; ; ; ; | ||
IMAGE: width: 300, height: 600 ; ; ; ; | ||
NAMED-OBJECT: id: NIL, tag: NIL, ; ; ; ; | ||
data: #<RGB-IMAGE (300x600) {7006A8E413}> ; ; ; ; | ||
********** ; ; ; ; | ||
</pre> | ||
<p class="item_name">SYNOPSIS</p> | ||
<pre class="source">(defmethod <strong>scale</strong> ((img <a href="#robo11">image</a>) width-factor height-factor | ||
|
@@ -361,7 +405,7 @@ | |
|
||
<hr /> | ||
<a name="image2fwrite2djpg"></a> | ||
<a name="robo50"></a><h2>image/write-jpg [ Methods ]</h2> | ||
<a name="robo51"></a><h2>image/write-jpg [ Methods ]</h2> | ||
|
||
<p>[ <a href="#robo_top_of_doc">Top</a> ] [ <a href="#robo11">image</a> ] [ <a href="./robo_methods.html#robo_top_of_doc">Methods</a> ]</p> | ||
<p class="item_name">AUTHOR</p> | ||
|
@@ -390,8 +434,8 @@ | |
<pre> The outfile path (string). | ||
</pre> | ||
<p class="item_name">EXAMPLE</p> | ||
<pre class="source">(let ((img1 (<a href="#robo47">make-rgb-image</a> 200 300)) | ||
(img2 (<a href="#robo47">make-rgb-image</a> 30 30 :initial-color (make-color 20 90 111)))) | ||
<pre class="source">(let ((img1 (<a href="#robo48">make-rgb-image</a> 200 300)) | ||
(img2 (<a href="#robo48">make-rgb-image</a> 30 30 :initial-color (make-color 20 90 111)))) | ||
(<a href="#robo43">copy</a> img1 img2 :height 10 :width 10 | ||
:dest-x 20 :dest-y 25) | ||
(<strong>write-jpg</strong> img1)) | ||
|
@@ -406,7 +450,7 @@ | |
|
||
<hr /> | ||
<a name="image2fwrite2dpng"></a> | ||
<a name="robo51"></a><h2>image/write-png [ Methods ]</h2> | ||
<a name="robo52"></a><h2>image/write-png [ Methods ]</h2> | ||
|
||
<p>[ <a href="#robo_top_of_doc">Top</a> ] [ <a href="#robo11">image</a> ] [ <a href="./robo_methods.html#robo_top_of_doc">Methods</a> ]</p> | ||
<p class="item_name">AUTHOR</p> | ||
|
@@ -430,8 +474,8 @@ | |
<pre> The path to the output file. | ||
</pre> | ||
<p class="item_name">EXAMPLE</p> | ||
<pre class="source">(let ((img1 (<a href="#robo47">make-rgb-image</a> 200 300)) | ||
(img2 (<a href="#robo47">make-rgb-image</a> 30 30 :initial-color (make-color 20 90 111)))) | ||
<pre class="source">(let ((img1 (<a href="#robo48">make-rgb-image</a> 200 300)) | ||
(img2 (<a href="#robo48">make-rgb-image</a> 30 30 :initial-color (make-color 20 90 111)))) | ||
(<a href="#robo43">copy</a> img1 img2 :height 10 :width 10 | ||
:dest-x 20 :dest-y 25) | ||
(<strong>write-png</strong> img1)) | ||
|
@@ -442,7 +486,7 @@ | |
|
||
</div> <!-- content --> | ||
<div id="footer"> | ||
<p>Generated from ./src/image.lisp with <a href="http://www.xs4all.nl/~rfsber/Robo/robodoc.html">ROBODoc</a> V4.99.44 on 2024-04-26 00:39:03</p> | ||
<p>Generated from ./src/image.lisp with <a href="http://www.xs4all.nl/~rfsber/Robo/robodoc.html">ROBODoc</a> V4.99.44 on 2024-10-17 15:02:00</p> | ||
</div> <!-- footer --> | ||
</body> | ||
</html> |
Oops, something went wrong.