gmic_stdlib.gmic (gmic_3.0.1) | : | gmic_stdlib.gmic (gmic_3.0.2) | ||
---|---|---|---|---|
skipping to change at line 1228 | skipping to change at line 1228 | |||
"<html lang=\"en\">"\n\ | "<html lang=\"en\">"\n\ | |||
" <head>"\n\ | " <head>"\n\ | |||
" <meta charset=\"utf-8\">"\n\ | " <meta charset=\"utf-8\">"\n\ | |||
" <link rel=\"stylesheet\" href=\"../style.css\">"\n\ | " <link rel=\"stylesheet\" href=\"../style.css\">"\n\ | |||
" <title>G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Sour ce Framework for Image Processing "\ | " <title>G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Sour ce Framework for Image Processing "\ | |||
"- "$name"</title>"\n\ | "- "$name"</title>"\n\ | |||
" <script src=\"../jquery-3.5.1.min.js\"></script>"\n\ | " <script src=\"../jquery-3.5.1.min.js\"></script>"\n\ | |||
" <script>var jQuery_3_5_1 = $.noConflict(true);</script>"\n\ | " <script>var jQuery_3_5_1 = $.noConflict(true);</script>"\n\ | |||
" </head>"\n\n\ | " </head>"\n\n\ | |||
" <body>"\n\ | " <body>"\n\ | |||
" <!--#include file=\"header.html\" -->"\n\n\ | " <!--#include file=\"header1.html\" -->"\n\n\ | |||
" <div class=\"section_title\"><a href=\"index.html\"><p>Reference</p></a></d iv><div class=\"section_content\">"\n\ | " <div class=\"section_title\"><a href=\"index.html\"><p>Reference</p></a></d iv><div class=\"section_content\">"\n\ | |||
" <a name=\"top\"></a>"\n\ | " <a name=\"top\"></a>"\n\ | |||
"<!-- ref_navigation_top -->"\n\n\ | "<!-- ref_navigation_top -->"\n\n\ | |||
"<!-- begin_content -->"\n\n\ | "<!-- begin_content -->"\n\n\ | |||
" <h1 class=\"ref_h1\">"$name"</h1>"\n':y) | " <h1 class=\"ref_h1\">"$name"</h1>"\n':y) | |||
nm. $name | nm. $name | |||
reference_end_section_html : | reference_end_section_html : | |||
if $! # End previous section | if $! # End previous section | |||
('" <br/>"\n\n\ | ('" <br/>"\n\n\ | |||
skipping to change at line 1269 | skipping to change at line 1269 | |||
"<html lang=\"en\">"\n\ | "<html lang=\"en\">"\n\ | |||
" <head>"\n\ | " <head>"\n\ | |||
" <meta charset=\"utf-8\">"\n\ | " <meta charset=\"utf-8\">"\n\ | |||
" <link rel=\"stylesheet\" href=\"../style.css\">"\n\ | " <link rel=\"stylesheet\" href=\"../style.css\">"\n\ | |||
" <title>G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Sour ce Framework for Image Processing "\ | " <title>G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Sour ce Framework for Image Processing "\ | |||
"- Table of Contents</title>"\n\ | "- Table of Contents</title>"\n\ | |||
" <script src=\"../jquery-3.5.1.min.js\"></script>"\n\ | " <script src=\"../jquery-3.5.1.min.js\"></script>"\n\ | |||
" <script>var jQuery_3_5_1 = $.noConflict(true);</script>"\n\ | " <script>var jQuery_3_5_1 = $.noConflict(true);</script>"\n\ | |||
" </head>"\n\n\ | " </head>"\n\n\ | |||
" <body>"\n\ | " <body>"\n\ | |||
" <!--#include file=\"header.html\" -->"\n\n\ | " <!--#include file=\"header1.html\" -->"\n\n\ | |||
" <div class=\"section_title\"><a href=\"index.html\"><p>Reference</p></a></d iv><div class=\"section_content\">"\n\n\ | " <div class=\"section_title\"><a href=\"index.html\"><p>Reference</p></a></d iv><div class=\"section_content\">"\n\n\ | |||
" <a name=\"top\"></a>"\n\ | " <a name=\"top\"></a>"\n\ | |||
"<!-- ref_navigation_top -->"\n\n\ | "<!-- ref_navigation_top -->"\n\n\ | |||
"<!-- begin_content -->"\n\n\ | "<!-- begin_content -->"\n\n\ | |||
" <h1 class=\"ref_h1\">Preamble</h1>"\n\ | " <h1 class=\"ref_h1\">Preamble</h1>"\n\ | |||
" <ul><li>This document is distributed under the "\ | " <ul><li>This document is distributed under the "\ | |||
"<a target=\"_blank\" href=\"http://www.gnu.org/licenses/fdl-1.3.txt\">GNU Free Documentation License</a>, "\ | "<a target=\"_blank\" href=\"http://www.gnu.org/licenses/fdl-1.3.txt\">GNU Free Documentation License</a>, "\ | |||
"version 1.3.</li>"\n\ | "version 1.3.</li>"\n\ | |||
" <li>A <a href=\"gmic_reference.pdf\">.pdf version</a> of this document is available.</li>"\n | " <li>A <a href=\"gmic_reference.pdf\">.pdf version</a> of this document is available.</li>"\n | |||
skipping to change at line 3768 | skipping to change at line 3768 | |||
#@cli : in the '${-path_cache}' folder. | #@cli : in the '${-path_cache}' folder. | |||
#@cli : Default value: 'try_downloading_from_gmic_server=1'. | #@cli : Default value: 'try_downloading_from_gmic_server=1'. | |||
+input_cached : check "isbool(${2=1})" | +input_cached : check "isbool(${2=1})" | |||
basename "$1" basename=${} | basename "$1" basename=${} | |||
e[^-1] "Input cached file '"$basename"'." | e[^-1] "Input cached file '"$basename"'." | |||
if ['$GMIC_SYSTEM_PATH']!=0 g_path_unix=$GMIC_SYSTEM_PATH/ else g_path_unix=/u sr/lib/gimp/2.0/plug-ins/ fi | if ['$GMIC_SYSTEM_PATH']!=0 g_path_unix=$GMIC_SYSTEM_PATH/ else g_path_unix=/u sr/lib/gimp/2.0/plug-ins/ fi | |||
path_test0=${-path_cache} | path_test0=${-path_cache} | |||
path_test1=$_path_rc | path_test1=$_path_rc | |||
path_test2=${-path_gimp}plug-ins/ | path_test2=${-path_gimp}plug-ins/ | |||
path_test3=${-path_gimp}plug-ins/gmic_gimp_qt/ | path_test3=${-path_gimp}plug-ins/gmic_gimp_qt/ | |||
path_test4=$g_path_unix | if !${-is_windows} | |||
path_test4=/usr/share/gmic/ | ||||
path_test5=$g_path_unix | ||||
fi | ||||
file_found=0 | file_found=0 | |||
repeat 5 | repeat inf | |||
if ['${path_test$>}']==0 break fi | ||||
file=${path_test$>}$basename | file=${path_test$>}$basename | |||
l[] i $file file_found=1 onfail endl | l[] i $file file_found=1 onfail endl | |||
if $file_found break fi | if $file_found break fi | |||
done | done | |||
if !$file_found" && $2" # Try downloading from the G'MIC server | if !$file_found" && $2" # Try downloading from the G'MIC server | |||
url=https://gmic.eu/"$1" | url=https://gmic.eu/"$1" | |||
l[] i $url o ${-path_cache}$basename file_found=1 is_change 1 | l[] i $url o ${-path_cache}$basename file_found=1 is_change 1 | |||
onfail | onfail | |||
endl | endl | |||
fi | fi | |||
skipping to change at line 4541 | skipping to change at line 4545 | |||
" <meta charset=\"utf-8\">"\n\ | " <meta charset=\"utf-8\">"\n\ | |||
" <link rel=\"stylesheet\" href=\"../style.css\">"\n\ | " <link rel=\"stylesheet\" href=\"../style.css\">"\n\ | |||
" <link rel=\"stylesheet\" href=\"../highslide/highslide.css\"/>"\n\ | " <link rel=\"stylesheet\" href=\"../highslide/highslide.css\"/>"\n\ | |||
" <link rel=\"stylesheet\" href=\"https://code.jquery.com/ui/1.12.1/themes/ba se/jquery-ui.css\">"\n\n\ | " <link rel=\"stylesheet\" href=\"https://code.jquery.com/ui/1.12.1/themes/ba se/jquery-ui.css\">"\n\n\ | |||
" <title>G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Sour ce Framework for Image Processing "\ | " <title>G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Sour ce Framework for Image Processing "\ | |||
"- Reference Documentation</title>"\n\ | "- Reference Documentation</title>"\n\ | |||
" <script src=\"../jquery-3.5.1.min.js\"></script>"\n\ | " <script src=\"../jquery-3.5.1.min.js\"></script>"\n\ | |||
" <script>var jQuery_3_5_1 = $.noConflict(true);</script>"\n\ | " <script>var jQuery_3_5_1 = $.noConflict(true);</script>"\n\ | |||
" </head>"\n\n\ | " </head>"\n\n\ | |||
" <body>"\n\ | " <body>"\n\ | |||
" <!--#include file=\"header.html\" -->"\n\n\ | " <!--#include file=\"header1.html\" -->"\n\n\ | |||
" <div class=\"section_title\"><a href=\"index.html\"><p>Reference</p></a></d iv><div class=\"section_content\">"\n\n\ | " <div class=\"section_title\"><a href=\"index.html\"><p>Reference</p></a></d iv><div class=\"section_content\">"\n\n\ | |||
" <a name=\"top\"></a>"\n\n\ | " <a name=\"top\"></a>"\n\n\ | |||
"<!-- begin_content -->"\n\n\ | "<!-- begin_content -->"\n\n\ | |||
"<!-- list_of_categories -->"\n | "<!-- list_of_categories -->"\n | |||
list_categories,c= | list_categories,c= | |||
category,p_category= n,is_tr,is_table,row=0 | category,p_category= n,is_tr,is_table,row=0 | |||
repeat $! if s=['{$>,n}'];s[0]==_'_' continue fi l[$>] | repeat $! if s=['{$>,n}'];s[0]==_'_' continue fi l[$>] | |||
('{n}') l. s -,{'@'} name={0,t} if $!>1 category={1,t} else category= fi rm endl | ('{n}') l. s -,{'@'} name={0,t} if $!>1 category={1,t} else category= fi rm endl | |||
if ['$category']!=['$p_category'] | if ['$category']!=['$p_category'] | |||
skipping to change at line 4617 | skipping to change at line 4621 | |||
html.="</tr>"\n | html.="</tr>"\n | |||
n+=1 | n+=1 | |||
fi | fi | |||
endl done | endl done | |||
if $is_table html.=" </table>"\n fi | if $is_table html.=" </table>"\n fi | |||
html.=\n\ | html.=\n\ | |||
"<!-- end_content -->"\n\n\ | "<!-- end_content -->"\n\n\ | |||
"<!-- ref_navigation_bottom -->"\n\ | "<!-- ref_navigation_bottom -->"\n\ | |||
" </div><div class=\"section_end\"></div>"\n\ | " </div><div class=\"section_end\"></div>"\n\ | |||
" <!--#include file=\"footer.html\" -->"\n\ | " <!--#include file=\"../footer1.html\" -->"\n\ | |||
" </body>" | " </body>" | |||
({'$html'}:y) | ({'$html'}:y) | |||
# Insert TOC for categories. | # Insert TOC for categories. | |||
toc_html=" <h1 class=\"ref_h1\">Categories:</h1><ul>"\n | toc_html=" <h1 class=\"ref_h1\">Categories:</h1><ul>"\n | |||
repeat narg({/$list_categories}) | repeat narg({/$list_categories}) | |||
arg 1+$>,{/$list_categories} category=${} | arg 1+$>,{/$list_categories} category=${} | |||
('$category') replace_str. ",","," category={t} rm. | ('$category') replace_str. ",","," category={t} rm. | |||
strvar $category category_id=${} | strvar $category category_id=${} | |||
toc_html.=" <li><a href=\"#"$category_id"\">"$category"</a></li>"\n | toc_html.=" <li><a href=\"#"$category_id"\">"$category"</a></li>"\n | |||
skipping to change at line 4677 | skipping to change at line 4681 | |||
" <script src=\"../jquery-3.5.1.min.js\"></script>"\n\ | " <script src=\"../jquery-3.5.1.min.js\"></script>"\n\ | |||
" <script>var jQuery_3_5_1 = $.noConflict(true);</script>"\n\ | " <script>var jQuery_3_5_1 = $.noConflict(true);</script>"\n\ | |||
" <script src=\"../highslide/highslide-full.js\"></script>"\n\ | " <script src=\"../highslide/highslide-full.js\"></script>"\n\ | |||
" <script>"\n\ | " <script>"\n\ | |||
" hs.graphicsDir = '../highslide/graphics/';"\n\ | " hs.graphicsDir = '../highslide/graphics/';"\n\ | |||
" hs.wrapperClassName = 'wide-border';"\n\ | " hs.wrapperClassName = 'wide-border';"\n\ | |||
" hs.showCredits = 'false';"\n\ | " hs.showCredits = 'false';"\n\ | |||
" </script>"\n\ | " </script>"\n\ | |||
" </head>"\n\n\ | " </head>"\n\n\ | |||
" <body>"\n\ | " <body>"\n\ | |||
" <!--#include file=\"header.html\" -->"\n\n\ | " <!--#include file=\"header1.html\" -->"\n\n\ | |||
" <div class=\"section_title\"><a href=\"index.html\"><p>Reference</p></a></d iv>"\ | " <div class=\"section_title\"><a href=\"index.html\"><p>Reference</p></a></d iv>"\ | |||
"<div class=\"section_content\" style=\"padding-top: 0;\">"\n\n\ | "<div class=\"section_content\" style=\"padding-top: 0;\">"\n\n\ | |||
" <a name=\"top\"></a>"\n\n\ | " <a name=\"top\"></a>"\n\n\ | |||
"<!-- begin_content -->"\n\n | "<!-- begin_content -->"\n\n | |||
if !0$_pdf_output | if !0$_pdf_output | |||
html.=" <table class=\"ref_navigation_top\"><tr><td>"\ | html.=" <table class=\"ref_navigation_top\"><tr><td>"\ | |||
"<a href=\"index.html\">Table of Contents</a> ▸ "\ | "<a href=\"index.html\">Table of Contents</a> ▸ "\ | |||
"<a href=\"list_of_commands.html#top\">List of Commands</a> ▸&n bsp; "\ | "<a href=\"list_of_commands.html#top\">List of Commands</a> ▸&n bsp; "\ | |||
"<a href=\"list_of_commands.html#"$category_id"\">"$category"</a> 	 656; "\ | "<a href=\"list_of_commands.html#"$category_id"\">"$category"</a> 	 656; "\ | |||
skipping to change at line 5857 | skipping to change at line 5861 | |||
i[0] ('"<!DOCTYPE html>"\n\ | i[0] ('"<!DOCTYPE html>"\n\ | |||
"<html lang=\"en\">"\n\ | "<html lang=\"en\">"\n\ | |||
" <head>"\n\ | " <head>"\n\ | |||
" <meta charset=\"utf-8\">"\n\ | " <meta charset=\"utf-8\">"\n\ | |||
" <link rel=\"stylesheet\" href=\""$style"\">"\n\ | " <link rel=\"stylesheet\" href=\""$style"\">"\n\ | |||
" <title>"$title"</title>"\n\ | " <title>"$title"</title>"\n\ | |||
" <script src=\"../jquery-3.5.1.min.js\"></script>"\n\ | " <script src=\"../jquery-3.5.1.min.js\"></script>"\n\ | |||
" <script>var jQuery_3_5_1 = $.noConflict(true);</script>"\n\ | " <script>var jQuery_3_5_1 = $.noConflict(true);</script>"\n\ | |||
" </head>"\n\n\ | " </head>"\n\n\ | |||
" <body>"\n\ | " <body>"\n\ | |||
" <!--#include file=\"header.html\" -->"\n\n\ | " <!--#include file=\"header1.html\" -->"\n\n\ | |||
" <div class=\"section_title\"><p>"$section_title"</p></div><div class=\"sect ion_content\">"\n\n\ | " <div class=\"section_title\"><p>"$section_title"</p></div><div class=\"sect ion_content\">"\n\n\ | |||
"<!-- begin_content -->"\n\n':y) | "<!-- begin_content -->"\n\n':y) | |||
('\n\n\ | ('\n\n\ | |||
"<!-- end_content -->"\n\n\ | "<!-- end_content -->"\n\n\ | |||
" </div><div class=\"section_end\"></div>"\n\n\ | " </div><div class=\"section_end\"></div>"\n\n\ | |||
" <!--#include file=\"footer.html\" -->"\n\ | " <!--#include file=\"footer.html\" -->"\n\ | |||
" </body>"':y) | " </body>"':y) | |||
a y nm $nm.html | a y nm $nm.html | |||
endl done | endl done | |||
fi | fi | |||
skipping to change at line 7945 | skipping to change at line 7949 | |||
\#@gui : Best regards,\\n\\n <i>The G\47MIC team.</i>\"}\n\n"') | \#@gui : Best regards,\\n\\n <i>The G\47MIC team.</i>\"}\n\n"') | |||
y[1] a y | y[1] a y | |||
o cimgz:$file,uchar | o cimgz:$file,uchar | |||
_upload[] $file | _upload[] $file | |||
e[0--4] " > Done! Version $1 is now deprecated." | e[0--4] " > Done! Version $1 is now deprecated." | |||
fi | fi | |||
rm endl | rm endl | |||
# update_download_version. | # update_download_version. | |||
# Update file versions on G'MIC download page, with specified version number. | # Update file versions on G'MIC download page, with specified version number. | |||
# $1 = version number (e.g. '3.0.1'). | # $1 = version number (e.g. '3.0.2'). | |||
update_download_version : check " | update_download_version : check " | |||
is_digit(c)=(c>=_'0' && c<=_'9'); | is_digit(c)=(c>=_'0' && c<=_'9'); | |||
ver = ['${1=undefined}']; | ver = ['${1=undefined}']; | |||
size(ver)==5 && is_digit(ver[0]) && ver[1]==_'.' && is_digit(ver[2]) && ver[ 3]==_'.' && is_digit(ver[4])" | size(ver)==5 && is_digit(ver[0]) && ver[1]==_'.' && is_digit(ver[2]) && ver[ 3]==_'.' && is_digit(ver[4])" | |||
e[^-1] "Replace version number on G'MIC download page to '$1'." | e[^-1] "Replace version number on G'MIC download page to '$1'." | |||
rm filename=$HOME/work/src/gmic/html/download.html it[] $filename | rm filename=$HOME/work/src/gmic/html/download.html it[] $filename | |||
eval " | eval " | |||
is_digit(c) = (c>=_'0' && c<=_'9'); | is_digit(c) = (c>=_'0' && c<=_'9'); | |||
ver = ['$1']; | ver = ['$1']; | |||
ref(crop(),data); | ref(crop(),data); | |||
skipping to change at line 8112 | skipping to change at line 8116 | |||
repeat narg($categories) | repeat narg($categories) | |||
category=${arg\ {1+$>},$categories} | category=${arg\ {1+$>},$categories} | |||
presets=${-_fx_cluts_$category} | presets=${-_fx_cluts_$category} | |||
nb_presets+={narg({/$presets})} | nb_presets+={narg({/$presets})} | |||
done | done | |||
e[] "\n > Update 'Color Presets' pages, for "$!" image samples and "$nb_preset s" presets." | e[] "\n > Update 'Color Presets' pages, for "$!" image samples and "$nb_preset s" presets." | |||
# Prepare folder structure. | # Prepare folder structure. | |||
e[] $_vt100_g"\n * Prepare folder structure."$_vt100_n | e[] $_vt100_g"\n * Prepare folder structure."$_vt100_n | |||
x "ln -fs "$HOME/work/src/gmic/html/header1.html" ." | ||||
x "ln -fs "$HOME/work/src/gmic/html/footer.html" ." | ||||
x "mkdir -p img" | x "mkdir -p img" | |||
# Generate thumbnails. | # Generate thumbnails. | |||
e[] $_vt100_g"\n * Generate thumbnails from samples.\n"$_vt100_n | e[] $_vt100_g"\n * Generate thumbnails from samples.\n"$_vt100_n | |||
x "mkdir -p original" | x "mkdir -p original" | |||
nb_samples=$! | nb_samples=$! | |||
to_rgb repeat $nb_samples l[$<] | to_rgb repeat $nb_samples l[$<] | |||
nm[0] sample_{1+$<} | nm[0] sample_{1+$<} | |||
basename={0,b} basename$<=$basename | basename={0,b} basename$<=$basename | |||
e[] " - "$basename | e[] " - "$basename | |||
skipping to change at line 8211 | skipping to change at line 8217 | |||
" <script src=\"../jquery-3.5.1.min.js\"></script>"\n\ | " <script src=\"../jquery-3.5.1.min.js\"></script>"\n\ | |||
" <script>var jQuery_3_5_1 = $.noConflict(true);</script>"\n\ | " <script>var jQuery_3_5_1 = $.noConflict(true);</script>"\n\ | |||
" <script src=\"../highslide/highslide-full.js\"></script>"\n\ | " <script src=\"../highslide/highslide-full.js\"></script>"\n\ | |||
" <script>"\n\ | " <script>"\n\ | |||
" hs.graphicsDir = '../highslide/graphics/';"\n\ | " hs.graphicsDir = '../highslide/graphics/';"\n\ | |||
" hs.wrapperClassName = 'wide-border';"\n\ | " hs.wrapperClassName = 'wide-border';"\n\ | |||
" hs.showCredits = 'false';"\n\ | " hs.showCredits = 'false';"\n\ | |||
" </script>"\n\ | " </script>"\n\ | |||
" </head>"\n\n\ | " </head>"\n\n\ | |||
" <body>"\n\ | " <body>"\n\ | |||
" <!--#include file=\"header.html\" -->"\n\n\ | " <!--#include file=\"header1.html\" -->"\n\n\ | |||
" <div class=\"section_title\"><p>Color Presets</p></div><div class=\"section _content\">"\n\n\ | " <div class=\"section_title\"><p>Color Presets</p></div><div class=\"section _content\">"\n\n\ | |||
" <p>Among all features available in <span class=\"gmd_gmic\">G'MIC</s pan>, our <b>Color Presets</b> and "\ | " <p>Among all features available in <span class=\"gmd_gmic\">G'MIC</s pan>, our <b>Color Presets</b> and "\ | |||
"<b>Simulate Film</b> filters are able to apply various pre-defined <b>color CLU Ts</b> on your images "\ | "<b>Simulate Film</b> filters are able to apply various pre-defined <b>color CLU Ts</b> on your images "\ | |||
"(<b>600+</b> color CLUTs available).</p>"\n\ | "(<b>600+</b> color CLUTs available).</p>"\n\ | |||
" <p>Below, you can navigate through the different proposed presets and see how they modify the colors "\ | " <p>Below, you can navigate through the different proposed presets and see how they modify the colors "\ | |||
"of some sample images."\n\ | "of some sample images."\n\ | |||
" You can also download each color preset separately as its corresponding "\ | " You can also download each color preset separately as its corresponding "\ | |||
"<a href=\"http://www.quelsolaar.com/technology/clut.html\">HaldCLUT</a> file (i n <b>.png</b> format), to use it in "\ | "<a href=\"http://www.quelsolaar.com/technology/clut.html\">HaldCLUT</a> file (i n <b>.png</b> format), to use it in "\ | |||
" other software that support this feature.</p>"\n\n\ | " other software that support this feature.</p>"\n\n\ | |||
" <p><b>Image credits:</b> Sample images below have been borrowed from "\ | " <p><b>Image credits:</b> Sample images below have been borrowed from "\ | |||
skipping to change at line 8426 | skipping to change at line 8432 | |||
" <script src=\"https://code.jquery.com/jquery-1.12.4.js\"></script>"\n\ | " <script src=\"https://code.jquery.com/jquery-1.12.4.js\"></script>"\n\ | |||
" <script src=\"https://code.jquery.com/ui/1.12.1/jquery-ui.js\"></script>"\n \n\ | " <script src=\"https://code.jquery.com/ui/1.12.1/jquery-ui.js\"></script>"\n \n\ | |||
" <script src=\"../highslide/highslide-full.js\"></script>"\n\ | " <script src=\"../highslide/highslide-full.js\"></script>"\n\ | |||
" <script>"\n\ | " <script>"\n\ | |||
" hs.graphicsDir = '../highslide/graphics/';"\n\ | " hs.graphicsDir = '../highslide/graphics/';"\n\ | |||
" hs.wrapperClassName = 'wide-border';"\n\ | " hs.wrapperClassName = 'wide-border';"\n\ | |||
" hs.showCredits = 'false';"\n\ | " hs.showCredits = 'false';"\n\ | |||
" </script>"\n\ | " </script>"\n\ | |||
" </head>"\n\n\ | " </head>"\n\n\ | |||
" <body>"\n\ | " <body>"\n\ | |||
" <!--#include file=\"header.html\" -->"\n\n\ | " <!--#include file=\"header1.html\" -->"\n\n\ | |||
" <div class=\"section_title\"><p>Image Gallery</p></div><div class=\"section _content\">"\n\n\ | " <div class=\"section_title\"><p>Image Gallery</p></div><div class=\"section _content\">"\n\n\ | |||
" <p>This gallery gives a quick overview of the kind of features and generi c filters available in the "\ | " <p>This gallery gives a quick overview of the kind of features and generi c filters available in the "\ | |||
"<span class=\"gmd_gmic\">G'MIC</span> open-source image processing framewo rk.</p>"\n\ | "<span class=\"gmd_gmic\">G'MIC</span> open-source image processing framewo rk.</p>"\n\ | |||
" <p>All the images below have been processed by the CLI interface "\ | " <p>All the images below have been processed by the CLI interface "\ | |||
"<samp><a href=\"reference/\">gmic</a></samp>"\ | "<samp><a href=\"reference/\">gmic</a></samp>"\ | |||
" of G'MIC, from a set of initial 2D color images."\n\ | " of G'MIC, from a set of initial 2D color images."\n\ | |||
" Click on an image to enlarge it and display the G'MIC command-line "\ | " Click on an image to enlarge it and display the G'MIC command-line "\ | |||
"used for the processing (<i>note: to reproduce this, you may have to escape som e characters, "\ | "used for the processing (<i>note: to reproduce this, you may have to escape som e characters, "\ | |||
"according to the type of shell you use!</i>).</p>"\n\ | "according to the type of shell you use!</i>).</p>"\n\ | |||
" <p>Remember, G'MIC lets you define your own image pipelines through" \ | " <p>Remember, G'MIC lets you define your own image pipelines through" \ | |||
skipping to change at line 8667 | skipping to change at line 8673 | |||
${html_menu}\ | ${html_menu}\ | |||
" </div><div class=\"section_end\"></div>"\n\ | " </div><div class=\"section_end\"></div>"\n\ | |||
" <!--#include file=\"footer.html\" -->"\n\ | " <!--#include file=\"footer.html\" -->"\n\ | |||
" </body>" | " </body>" | |||
('$html') ot. $category.html rm. | ('$html') ot. $category.html rm. | |||
done | done | |||
rm | rm | |||
# Transfer on G'MIC server | # Transfer on G'MIC server | |||
x "ln -fs artistic.html index.html" | x "ln -fs artistic.html index.html" | |||
x "ln -fs "$HOME/work/src/gmic/html/header1.html" ." | ||||
x "ln -fs "$HOME/work/src/gmic/html/footer.html" ." | ||||
if $1 | if $1 | |||
e[] "\n * Transfer gallery on G'MIC server.\n" | e[] "\n * Transfer gallery on G'MIC server.\n" | |||
x "lftp ftp://"$GMIC_LOGIN":"$GMIC_PASSWD"@"$GMIC_FTP" -e \"mirror -eRL . /w ww/gmic/gallery ; quit\"" | x "lftp ftp://"$GMIC_LOGIN":"$GMIC_PASSWD"@"$GMIC_FTP" -e \"mirror -eRL . /w ww/gmic/gallery ; quit\"" | |||
fi | fi | |||
e[] " * All done!\n" | e[] " * All done!\n" | |||
# Generate a single image from a list of images, for the gallery. | # Generate a single image from a list of images, for the gallery. | |||
_gallery : | _gallery : | |||
repeat $! l[$>] W$>={w} H$>={h} D$>={d} S$>={s} IS_3D$>=${-_is_3d} endl done | repeat $! l[$>] W$>={w} H$>={h} D$>={d} S$>={s} IS_3D$>=${-_is_3d} endl done | |||
repeat $! l[$>] | repeat $! l[$>] | |||
skipping to change at line 9211 | skipping to change at line 9219 | |||
a y | a y | |||
# Generate image of examples. | # Generate image of examples. | |||
x "mkdir -p img" | x "mkdir -p img" | |||
_parse_cli_images_path="img/" | _parse_cli_images_path="img/" | |||
+parse_cli images | +parse_cli images | |||
parse_cli html | parse_cli html | |||
# Generate reference pages in html. | # Generate reference pages in html. | |||
rm | rm | |||
x "ln -fs "$HOME/work/src/gmic/html/header1.html" ." | ||||
x "ln -fs "$HOME/work/src/gmic/html/footer.html" ." | ||||
x "cp -rf "$HOME/work/src/gmic-community/reference/images" ." | x "cp -rf "$HOME/work/src/gmic-community/reference/images" ." | |||
reference html,$HOME/work/src/gmic-community/reference | reference html,$HOME/work/src/gmic-community/reference | |||
# Upload to G'MIC server. | # Upload to G'MIC server. | |||
if $1 | if $1 | |||
e[] "\n > Transfer reference documentation on G'MIC server.\n" | e[] "\n > Transfer reference documentation on G'MIC server.\n" | |||
x "lftp ftp://"$GMIC_LOGIN":"$GMIC_PASSWD"@"$GMIC_FTP" -e \"mirror -RL . /ww w/gmic/reference ; quit\"" | x "lftp ftp://"$GMIC_LOGIN":"$GMIC_PASSWD"@"$GMIC_FTP" -e \"mirror -RL . /ww w/gmic/reference ; quit\"" | |||
fi | fi | |||
e[] "\n > All done.\n" | e[] "\n > All done.\n" | |||
skipping to change at line 9237 | skipping to change at line 9247 | |||
"should be '"$path_ok"'." | "should be '"$path_ok"'." | |||
fi | fi | |||
rm | rm | |||
e[^-1] "Generate tutorial pages for the G'MIC website." | e[^-1] "Generate tutorial pages for the G'MIC website." | |||
path_tutorial=$HOME/work/src/gmic-community/tutorial | path_tutorial=$HOME/work/src/gmic-community/tutorial | |||
use_vt100 | use_vt100 | |||
# Build directory structure. | # Build directory structure. | |||
e[] " > Build directory structure." | e[] " > Build directory structure." | |||
x "ln -fs "$HOME/work/src/gmic/html/header1.html" ." | ||||
x "ln -fs "$HOME/work/src/gmic/html/footer.html" ." | ||||
x "mkdir -p images scripts" | x "mkdir -p images scripts" | |||
files 5,$path_tutorial/* | files 5,$path_tutorial/* | |||
l[] | l[] | |||
({'${}'}:y) s -,{','} | ({'${}'}:y) s -,{','} | |||
for $! | for $! | |||
file={0,t} rm[0] | file={0,t} rm[0] | |||
basename $file basename=${} 0 nm. $basename ext={`lowercase(['{x}'])`} rm. | basename $file basename=${} 0 nm. $basename ext={`lowercase(['{x}'])`} rm. | |||
if ['$basename']!='img' | if ['$basename']!='img' | |||
if isdir(['$file']) files 5,$file/* ({'${}'}:y) s. -,{','} # Folder -> R ecursively add files | if isdir(['$file']) files 5,$file/* ({'${}'}:y) s. -,{','} # Folder -> R ecursively add files | |||
elif s=['$ext'];s=='png'||s=='jpg'||s=='jpeg'||s=='gif'||s=='mp4'||s=='s vg' | elif s=['$ext'];s=='png'||s=='jpg'||s=='jpeg'||s=='gif'||s=='mp4'||s=='s vg' | |||
skipping to change at line 9626 | skipping to change at line 9638 | |||
upload_filters : | upload_filters : | |||
e[^-1] "Upload filter definition file on G'MIC server.\n" | e[^-1] "Upload filter definition file on G'MIC server.\n" | |||
rm | rm | |||
# Be sure to get the latest version of filters. | # Be sure to get the latest version of filters. | |||
x "cd "$HOME"/work/src/gmic && git pull" | x "cd "$HOME"/work/src/gmic && git pull" | |||
x "cd "$HOME"/work/src/gmic-community && git pull" | x "cd "$HOME"/work/src/gmic-community && git pull" | |||
# Define the list of compatible versions. | # Define the list of compatible versions. | |||
(301,$_version) sort. discard. store. compat | (300,301,302,$_version) sort. discard. store. compat | |||
# Import filters from stdlib and community. | # Import filters from stdlib and community. | |||
files $HOME/work/src/gmic-community/include/*.gmic | files $HOME/work/src/gmic-community/include/*.gmic | |||
files=${},$HOME/work/src/gmic/src/gmic_stdlib.gmic | files=${},$HOME/work/src/gmic/src/gmic_stdlib.gmic | |||
repeat narg($files) l[] | repeat narg($files) l[] | |||
file=${"arg 1+$>,"$files} | file=${"arg 1+$>,"$files} | |||
it[] $file | it[] $file | |||
basename $file basename=${} | basename $file basename=${} | |||
if ['$basename']=='sylvie_alexandre.gmic' | if ['$basename']=='sylvie_alexandre.gmic' | |||
s +,{'"#@gui <b>"'} i[1--2:2] ('"#@gui ________<b>Testing<b>\n#@gui <i>Sam j</i>\n"') y a y | s +,{'"#@gui <b>"'} i[1--2:2] ('"#@gui ________<b>Testing<b>\n#@gui <i>Sam j</i>\n"') y a y | |||
skipping to change at line 9840 | skipping to change at line 9852 | |||
a y | a y | |||
ot $filename | ot $filename | |||
rm | rm | |||
endl | endl | |||
#@cli v : eq. to 'verbose'. : (+) | #@cli v : eq. to 'verbose'. : (+) | |||
#@cli verbose : level : { + | - } : (+) | #@cli verbose : level : { + | - } : (+) | |||
#@cli : Set or increment/decrement the verbosity level. Default level is 0. | #@cli : Set or increment/decrement the verbosity level. Default level is 0. | |||
#@cli : (eq. to 'v').\n | #@cli : (eq. to 'v').\n | |||
#@cli : When 'level'>0, G'MIC log messages are displayed on the standard error ( stderr). | #@cli : When 'level>0', G'MIC log messages are displayed on the standard error ( stderr). | |||
#@cli : Default value: 'level=1'. | #@cli : Default value: 'level=1'. | |||
#@cli wait : delay : (no arg) : (+) | #@cli wait : delay : (no arg) : (+) | |||
#@cli : Wait for a given delay (in ms), optionally since the last call to 'wait' . | #@cli : Wait for a given delay (in ms), optionally since the last call to 'wait' . | |||
#@cli : or wait for a user event occurring on the selected instant display windo ws. | #@cli : or wait for a user event occurring on the selected instant display windo ws. | |||
#@cli : 'delay' can be { <0=delay+flush events | 0=event | >0=delay }. | #@cli : 'delay' can be { <0=delay+flush events | 0=event | >0=delay }. | |||
#@cli : Command selection (if any) stands for instant display window indices ins tead of image indices. | #@cli : Command selection (if any) stands for instant display window indices ins tead of image indices. | |||
#@cli : If no window indices are specified and if 'delay' is positive, the comma nd results | #@cli : If no window indices are specified and if 'delay' is positive, the comma nd results | |||
#@cli : in a 'hard' sleep during specified delay. | #@cli : in a 'hard' sleep during specified delay. | |||
#@cli : Default value: 'delay=0'. | #@cli : Default value: 'delay=0'. | |||
skipping to change at line 13336 | skipping to change at line 13348 | |||
else | else | |||
pass$1 | pass$1 | |||
store. _transfer_pca_reference | store. _transfer_pca_reference | |||
repeat $! _transfer_pca[$>] done | repeat $! _transfer_pca[$>] done | |||
fi | fi | |||
_transfer_pca_reference= | _transfer_pca_reference= | |||
_transfer_pca : | _transfer_pca : | |||
$_transfer_pca_reference | $_transfer_pca_reference | |||
f.. "*begin( | f.. "*begin( | |||
cov = [ "${"covariance_colors[0] _avg"}" ]; | cov_ref = [ "${"covariance_vectors[1] _avg_ref"}" ]; | |||
avg = [ "$_avg" ]; | cov = [ "${"covariance_vectors[0] _avg"}" ]; | |||
eig = eig(cov); | ||||
lambda = 1/sqrt(1e-6 + eig[0,s]); | ||||
rot = mul(diag(lambda),eig[s,s*s],s); | ||||
cov_ref = [ "${"covariance_colors[1] _avg_ref"}" ]; | ||||
avg_ref = [ "$_avg_ref" ]; | avg_ref = [ "$_avg_ref" ]; | |||
avg = [ "$_avg" ]; | ||||
eig_ref = eig(cov_ref); | eig_ref = eig(cov_ref); | |||
eig = eig(cov); | ||||
lambda_ref = sqrt(eig_ref[0,s]); | lambda_ref = sqrt(eig_ref[0,s]); | |||
lambda = 1/sqrt(1e-6 + eig[0,s]); | ||||
repeat(s,k, # Align eigenvectors. | ||||
sks = s + k*s; | ||||
Uref = eig_ref[sks,s]; | ||||
U = eig[sks,s]; | ||||
dot(Uref,U)<0?copy(eig[sks],U*=-1); | ||||
); | ||||
rot_ref = mul(transpose(eig_ref[s,s*s],s),diag(lambda_ref),s); | rot_ref = mul(transpose(eig_ref[s,s*s],s),diag(lambda_ref),s); | |||
rot = mul(diag(lambda),eig[s,s*s],s); | ||||
M = mul(rot_ref,rot,s); | M = mul(rot_ref,rot,s); | |||
); | ); | |||
avg_ref + M*(I - avg)" | avg_ref + M*(I - avg)" | |||
rm. | rm. | |||
#@cli transfer_rgb : [target],_gamma>=0,_regularization>=0,_luminosity_constrain ts>=0,_rgb_resolution>=0,\ | #@cli transfer_rgb : [target],_gamma>=0,_regularization>=0,_luminosity_constrain ts>=0,_rgb_resolution>=0,\ | |||
# _is_constraints={ 0 | 1 } | # _is_constraints={ 0 | 1 } | |||
#@cli : Transfer colors from selected source images to selected reference image (given as argument). | #@cli : Transfer colors from selected source images to selected reference image (given as argument). | |||
#@cli : 'gamma' determines the importance of color occurrences in the matching p rocess (0=none to 1=huge). | #@cli : 'gamma' determines the importance of color occurrences in the matching p rocess (0=none to 1=huge). | |||
#@cli : 'regularization' determines the number of guided filter iterations to re move quantization effects. | #@cli : 'regularization' determines the number of guided filter iterations to re move quantization effects. | |||
skipping to change at line 16030 | skipping to change at line 16046 | |||
#@cli : If given 'nb_iterations' is '0', inversion is done in Fourier space (sin gle iteration), | #@cli : If given 'nb_iterations' is '0', inversion is done in Fourier space (sin gle iteration), | |||
#@cli : otherwise, by applying 'nb_iterations' of a Laplacian-inversion PDE flow . | #@cli : otherwise, by applying 'nb_iterations' of a Laplacian-inversion PDE flow . | |||
#@cli : Note that the resulting inversions are just estimation of possible/appro ximated solutions. | #@cli : Note that the resulting inversions are just estimation of possible/appro ximated solutions. | |||
#@cli : Default values: 'nb_iterations=0' and '[initial_estimated]=(undefined)'. | #@cli : Default values: 'nb_iterations=0' and '[initial_estimated]=(undefined)'. | |||
#@cli : $ image.jpg +laplacian +ilaplacian[-1] 0 | #@cli : $ image.jpg +laplacian +ilaplacian[-1] 0 | |||
ilaplacian : check "${1=0}>=0" skip "${2=}" | ilaplacian : check "${1=0}>=0" skip "${2=}" | |||
is_estimate=${"is_image_arg $2"} nb_iter={round($1)} | is_estimate=${"is_image_arg $2"} nb_iter={round($1)} | |||
if !$nb_iter # Inversion in Fourier space | if !$nb_iter # Inversion in Fourier space | |||
if $is_estimate | if $is_estimate | |||
e[0--4] "Invert Laplacian image$? in Fourier space, with initial estimate $2." | e[0--4] "Invert Laplacian image$? in Fourier space, with initial estimate $2." | |||
pass$2 1 ia=${-average_colors} rm. | pass$2 1 ia=${-average_vectors} rm. | |||
else | else | |||
e[0--4] "Invert Laplacian image$? in Fourier space." | e[0--4] "Invert Laplacian image$? in Fourier space." | |||
ia=0 | ia=0 | |||
fi | fi | |||
repeat $! l[$>] | repeat $! l[$>] | |||
fft 100%,100%,1,1,"2*(cos(x*2*pi/w) + cos(y*2*pi/h)) - 4" =. 1 | fft 100%,100%,1,1,"2*(cos(x*2*pi/w) + cos(y*2*pi/h)) - 4" =. 1 | |||
/[-3,-2] . rm. | /[-3,-2] . rm. | |||
= 0 ifft rm. | = 0 ifft rm. | |||
endl done + '"begin(S = resize(["$ia"],s,0)); S"' | endl done + '"begin(S = resize(["$ia"],s,0)); S"' | |||
skipping to change at line 17065 | skipping to change at line 17081 | |||
# Prepare input image data. | # Prepare input image data. | |||
mM={[im,iM]} repeat s sh. $> sum$>={is} var$>={iv} rm. done # Retrieve some stats for post-normalization. | mM={[im,iM]} repeat s sh. $> sum$>={is} var$>={iv} rm. done # Retrieve some stats for post-normalization. | |||
nw={if(${is_percent\ $1},$1*w,$1)} | nw={if(${is_percent\ $1},$1*w,$1)} | |||
nh={if(${is_percent\ $2},$2*h,$2)} | nh={if(${is_percent\ $2},$2*h,$2)} | |||
repeat s sum$>*={$nw*$nh/(w*h)} done # Re-estimate output (0,0) frequency. | repeat s sum$>*={$nw*$nh/(w*h)} done # Re-estimate output (0,0) frequency. | |||
if $nw>w||$nh>h # Spot extension required when rendering on bigger image. | if $nw>w||$nh>h # Spot extension required when rendering on bigger image. | |||
periodize_poisson | periodize_poisson | |||
100%,100% rectangle. 5,5,{w-6},{h-6},1,1 b. 2 n. 0,1 | 100%,100% rectangle. 5,5,{w-6},{h-6},1,1 b. 2 n. 0,1 | |||
$nw,$nh,1,{-2,s} fc. ${average_colors...} | $nw,$nh,1,{-2,s} fc. ${average_vectors...} | |||
j. ...,{(w-{-2,w})/2},{(h-{-2,h})/2},0,0,1,.. | j. ...,{(w-{-2,w})/2},{(h-{-2,h})/2},0,0,1,.. | |||
rm[-3,-2] | rm[-3,-2] | |||
else | else | |||
r $nw,$nh,1,100%,0,0,0.5,0.5 | r $nw,$nh,1,100%,0,0,0.5,0.5 | |||
periodize_poisson | periodize_poisson | |||
fi | fi | |||
fft | fft | |||
# Compute coherent random phase. | # Compute coherent random phase. | |||
100%,100% rand. {-pi},{pi} | 100%,100% rand. {-pi},{pi} | |||
skipping to change at line 20306 | skipping to change at line 20322 | |||
#@cli : Input 3D cup object. | #@cli : Input 3D cup object. | |||
#@cli : Default value: 'resolution=128'. | #@cli : Default value: 'resolution=128'. | |||
#@cli : $ cup3d , | #@cli : $ cup3d , | |||
+cup3d : check ${1=128}>0 | +cup3d : check ${1=128}>0 | |||
e[^-1] "Input 3D cup, with resolution $1." | e[^-1] "Input 3D cup, with resolution $1." | |||
100,200 | 100,200 | |||
ellipse. 0%,0%,40%,40%,0,1,1 | ellipse. 0%,0%,40%,40%,0,1,1 | |||
ellipse. 0,0,35%,35%,0,1,0 | ellipse. 0,0,35%,35%,0,1,0 | |||
polygon. 4,0,45%,8%,45%,20%,90%,0,90%,1,1 | polygon. 4,0,45%,8%,45%,20%,90%,0,90%,1,1 | |||
ellipse. 0%,100%,30%,10%,0,1,1 b. 0.1% | ellipse. 0%,100%,30%,10%,0,1,1 b. 0.1% | |||
lathe3d. $1,2 nm. [3D\ cup] | lathe3d. $1,2 | |||
nm. [3D\ cup] | ||||
#@cli cylinder3d : _radius,_height,_nb_subdivisions>0 | #@cli cylinder3d : _radius,_height,_nb_subdivisions>0 | |||
#@cli : Input 3D cylinder at (0,0,0), with specified geometry. | #@cli : Input 3D cylinder at (0,0,0), with specified geometry. | |||
#@cli : Default value: 'radius=1','height=1' and 'nb_subdivisions=24'. | #@cli : Default value: 'radius=1','height=1' and 'nb_subdivisions=24'. | |||
#@cli : $ cylinder3d 10,40 +primitives3d 1 color3d[-2] ${-rgb} | #@cli : $ cylinder3d 10,40 +primitives3d 1 color3d[-2] ${-rgb} | |||
+cylinder3d : check ${3=24}>0 skip ${1=1},${2=1} | +cylinder3d : check ${3=24}>0 skip ${1=1},${2=1} | |||
e[^-1] "Input 3D cylinder, with radius $1, height $2 and $3 subdivisions." | e[^-1] "Input 3D cylinder, with radius $1, height $2 and $3 subdivisions." | |||
l[] | l[] | |||
N={round($3)} | N={round($3)} | |||
nbv,nbp={[2*$N+2,3*$N]} | nbv,nbp={[2*$N+2,3*$N]} | |||
skipping to change at line 20791 | skipping to change at line 20808 | |||
#@cli label_points3d : _label_size>0,_opacity | #@cli label_points3d : _label_size>0,_opacity | |||
#@cli : Add a numbered label to all vertices of selected 3D objects. | #@cli : Add a numbered label to all vertices of selected 3D objects. | |||
#@cli : Default values: 'label_size=13' and 'opacity=0.8'. | #@cli : Default values: 'label_size=13' and 'opacity=0.8'. | |||
#@cli : $ torus3d 100,40,6,6 label_points3d 23,1 mode3d 1 | #@cli : $ torus3d 100,40,6,6 label_points3d 23,1 mode3d 1 | |||
label_points3d : check ${1=13}>0 skip ${2=0.8} | label_points3d : check ${1=13}>0 skip ${2=0.8} | |||
e[^-1] "Label vertices of 3D object$?." | e[^-1] "Label vertices of 3D object$?." | |||
repeat $! | repeat $! | |||
+p3d[$>] 0 l. s3d rm[-3--1] | +p3d[$>] 0 l. s3d rm[-3--1] | |||
nbp={-2,@0} =.. $nbp,0,1 # Set correct number of primitives | nbp={-2,@0} =.. $nbp,0,1 # Set correct number of primitives | |||
(1,0;1,{$nbp-1}) r. 2,$nbp,1,1,3 r. 1,{2*h},1,1,-1 # Create new primitive data | (1,0;1,{$nbp-1}) r. 2,$nbp,1,1,3 r. 1,{2*h},1,1,-1 # Create new primitiv e data | |||
repeat $nbp # Create texture labe ls as primitive colors. | repeat $nbp # Create texture labe ls as primitive colors. | |||
0 t. $>,0,0,$1,1,255,255,255 autocrop. 0 | 0 t. $>,0,0,$1,1,255,255,255 autocrop. 0 | |||
i.. (-128;{w};{h};3) y. | i.. (-128;{w};{h};3) y. | |||
done | done | |||
repeat $nbp # Create texture mask s as primitive opacities. | repeat $nbp # Create texture mask s as primitive opacities. | |||
0 t. $>,0,0,$1,1,$2 autocrop. 0 | 0 t. $>,0,0,$1,1,$2 autocrop. 0 | |||
i.. (-128;{w};{h};1) y. | i.. (-128;{w};{h};1) y. | |||
done | done | |||
a y # Merge final object data. | a y # Merge final object data. | |||
endl | endl | |||
+3d[$>,-1] | +3d[$>,-1] | |||
done | done | |||
#@cli lathe3d : _resolution>0,_smoothness[%]>=0,_max_angle>=0 | #@cli lathe3d : _resolution>0,_smoothness[%]>=0,_max_angle>=0 | |||
#@cli : Generate 3D object from selected binary XY-profiles. | #@cli : Generate 3D object from selected binary XY-profiles. | |||
#@cli : Default values: 'resolution=128', 'smoothness=0.5%' and 'max_angle=361'. | #@cli : Default values: 'resolution=128', 'smoothness=0.5%' and 'max_angle=361'. | |||
#@cli : $ 300,300 rand -1,1 blur 40 sign normalize 0,255 lathe3d , | #@cli : $ 300,300 rand -1,1 blur 40 sign normalize 0,255 lathe3d , | |||
lathe3d : check "${1=128}>0 && ${2=0.5%}>=0 && ${3=361}>=0" | lathe3d : check "${1=128}>0 && ${2=0.5%}>=0 && ${3=361}>=0" | |||
e[^-1] "Generate lathed 3D object from XY-profile$?, with resolution $1, smoot hness $2 and maximum angle $3 deg." | e[^-1] "Generate lathed 3D object from XY-profile$?, with resolution $1, smoot hness $2 and maximum angle $3 deg." | |||
tmax={($3-180)*pi/180} norm n 0,1 autocrop 0 | tmax={($3-180)*pi/180} round norm n 0,1 autocrop 0 | |||
repeat $! l[$>] | repeat $! l[$>] | |||
wr={max(1,w2=2*w;if(w2>h,min($1,w2),min($1,h)*w2/h))} | wr={max(1,w2=2*w;if(w2>h,min($1,w2),min($1,h)*w2/h))} | |||
hr={max(1,w2=2*w;if(w2>h,min($1,w2)*h/w2,min($1,h)))} | hr={max(1,w2=2*w;if(w2>h,min($1,w2)*h/w2,min($1,h)))} | |||
rmax={sqrt(($wr)^2+($hr)^2)/2} | rmax={sqrt(($wr)^2+($hr)^2)/2} | |||
$wr,1,$wr,1,"xc = x - w/2; zc = z - d/2; t = atan2(zc,xc); if(t>"$tmax","$rm ax",sqrt(xc*xc+zc*zc))" | $wr,1,$wr,1,"xc = x - w/2; zc = z - d/2; t = atan2(zc,xc); if(t>"$tmax","$rm ax",sqrt(xc*xc+zc*zc))" | |||
*. {2*({-2,w}-1)/(w-1)} r. $wr,$hr,$wr | *. {2*({-2,w}-1)/(w-1)} r. $wr,$hr,$wr | |||
(0;{{-2,h}-1}) r. $wr,$hr,$wr,1,3 a[-2--1] c | (0;{{-2,h}-1}) r. $wr,$hr,$wr,1,3 a[-2--1] c | |||
warp.. .,0,1,0 rm. | warp.. .,0,1,0 rm. | |||
expand_xyz 10,0 b $2 isosurface3d 50% rv3d | expand_xyz 10,0 b $2 isosurface3d 50% rv3d | |||
endl done | endl done | |||
skipping to change at line 27351 | skipping to change at line 27368 | |||
w={w} h={h} d={d} | w={w} h={h} d={d} | |||
value={i(w-1,h-1,d-1)} +=. {1+$value},100%,100%,100% _autocrop$is_auto. ${1--1 } =. $value,100%,100%,100% | value={i(w-1,h-1,d-1)} +=. {1+$value},100%,100%,100% _autocrop$is_auto. ${1--1 } =. $value,100%,100%,100% | |||
x0={$w-w} y0={$h-h} z0={$d-d} rm. | x0={$w-w} y0={$h-h} z0={$d-d} rm. | |||
+_autocrop$is_auto. ${1--1} | +_autocrop$is_auto. ${1--1} | |||
x1={$x0+w-1} y1={$y0+h-1} z1={$z0+d-1} rm. | x1={$x0+w-1} y1={$y0+h-1} z1={$z0+d-1} rm. | |||
u $x0,$y0,$z0,$x1,$y1,$z1 | u $x0,$y0,$z0,$x1,$y1,$z1 | |||
_autocrop0 : autocrop $* | _autocrop0 : autocrop $* | |||
_autocrop1 : skip $* autocrop | _autocrop1 : skip $* autocrop | |||
#@cli average_colors | #@cli average_vectors | |||
#@cli : Return the average vector-value of the latest of the selected images. | #@cli : Return the vector-valued average of the latest of the selected images. | |||
average_colors : | average_vectors : | |||
res="" | if !w u "" return fi | |||
repeat s-1 sh. {1+$>} res=$res,{ia} rm. done | repeat s-1 sh. $> res.={ia}, rm. done | |||
sh. 0 u {ia}$res rm. | sh. 100% u $res{ia} rm. | |||
#@cli base642img : "base64_string" | #@cli base642img : "base64_string" | |||
#@cli : Decode given base64-encoded string as a newly inserted image at the end of the list. | #@cli : Decode given base64-encoded string as a newly inserted image at the end of the list. | |||
#@cli : The argument string must have been generated using command 'img2base64'. | #@cli : The argument string must have been generated using command 'img2base64'. | |||
base642img : | base642img : | |||
base642uchar "$1" unserialize. | base642uchar "$1" unserialize. | |||
#@cli base642uchar : "base64_string" | #@cli base642uchar : "base64_string" | |||
#@cli : Decode given base64-encoded string as a newly inserted 1-column image at the end of the list. | #@cli : Decode given base64-encoded string as a newly inserted 1-column image at the end of the list. | |||
#@cli : The argument string must have been generated using command 'uchar2base64 '. | #@cli : The argument string must have been generated using command 'uchar2base64 '. | |||
skipping to change at line 27429 | skipping to change at line 27446 | |||
for (k = val = 0, str[k], ++k, | for (k = val = 0, str[k], ++k, | |||
c = str[k]; | c = str[k]; | |||
(val<<=1)+=(c==_'0'?0:c==_'1'?1:nan); | (val<<=1)+=(c==_'0'?0:c==_'1'?1:nan); | |||
isnan(val)?break() | isnan(val)?break() | |||
); sign($1)*val"} | ); sign($1)*val"} | |||
# Command to check what lines of G'MIC sources are larger than 120 columns. | # Command to check what lines of G'MIC sources are larger than 120 columns. | |||
_check120 : | _check120 : | |||
use_vt100 | use_vt100 | |||
it[] "$1" s +,10 | it[] "$1" s +,10 | |||
if !$! return fi | ||||
1,$!,1,2,">begin(line = 1); is_lines=i[#y,0]==10; line+=is_lines?h#y:0; [is_li nes || h#y<=120?-1:y,line]" | 1,$!,1,2,">begin(line = 1); is_lines=i[#y,0]==10; line+=is_lines?h#y:0; [is_li nes || h#y<=120?-1:y,line]" | |||
lines={{@-1}-1} f. "I = I; if(I[0]<0,I[1]=-1); I" | lines={{@-1}-1} f. "I = I; if(I[0]<0,I[1]=-1); I" | |||
discard. -1 | discard. -1 | |||
if w | if w | |||
r. 1,{h/2},1,2,-1 | r. 1,{h/2},1,2,-1 | |||
repeat h | repeat h | |||
l,L={I[$>]} | l,L={I[$>]} | |||
e[] $_vt100_c" - [Line "$_vt100_b$L$_vt100_n$_vt100_c", "\ | e[] $_vt100_c" - [Line "$_vt100_b$L$_vt100_n$_vt100_c", "\ | |||
$_vt100_b{$l,h}$_vt100_n$_vt100_c" chars]: "$_vt100_n{$l,t} | $_vt100_b{$l,h}$_vt100_n$_vt100_c" chars]: "$_vt100_n{$l,t} | |||
done | done | |||
skipping to change at line 27457 | skipping to change at line 27475 | |||
files 0,*.cpp c={`narg($files)?',':0`} if narg(${}) files=$files$c${} fi | files 0,*.cpp c={`narg($files)?',':0`} if narg(${}) files=$files$c${} fi | |||
files 0,*.c c={`narg($files)?',':0`} if narg(${}) files=$files$c${} fi | files 0,*.c c={`narg($files)?',':0`} if narg(${}) files=$files$c${} fi | |||
files 0,*.gmic c={`narg($files)?',':0`} if narg(${}) files=$files$c${} fi | files 0,*.gmic c={`narg($files)?',':0`} if narg(${}) files=$files$c${} fi | |||
repeat narg($files) | repeat narg($files) | |||
arg 1+$>,$files file=${} | arg 1+$>,$files file=${} | |||
e[] " * File '"$file"'." | e[] " * File '"$file"'." | |||
v + _check120 $file v - | v + _check120 $file v - | |||
done | done | |||
e[] " - Total scanned : "${_total_lines}" lines" | e[] " - Total scanned : "${_total_lines}" lines" | |||
#@cli covariance_colors : _avg_outvarname | #@cli covariance_vectors : _avg_outvarname | |||
#@cli : Return the covariance matrix of the vector-valued colors in the latest o f the selected images | #@cli : Return the covariance matrix of the vector-valued colors in the latest o f the selected images | |||
#@cli : (for arbitrary number of channels). | #@cli : (for arbitrary number of channels). | |||
#@cli : Parameter 'avg_outvarname' is used as a variable name that takes the val ue of the average vector-value. | #@cli : Parameter 'avg_outvarname' is used as a variable name that takes the val ue of the average vector-value. | |||
covariance_colors : skip "${1=avg}" | covariance_vectors : skip "${1=avg}" | |||
$1=${-average_colors} | $1=${-average_vectors} | |||
f ">begin( avg = [ "$""$1" ]; const S2 = s^2; C = vectorS2(0); ); | eval. "*begin(avg = [ "$""$1" ]; C = vector(#s^2,0)); | |||
mI = I - avg; C+=mul(mI,mI,s); | mI = I - avg; | |||
end( C/=whd - 1; run('u ',vtos(C)) ); | C+=mul(mI,mI,s); | |||
I" | end(merge(C,+); C/=whd - 1; run('u ',vtos(C)))" | |||
#@cli dec : decimal_int1,... | #@cli dec : decimal_int1,... | |||
#@cli : Print specified decimal integers into their binary, octal, hexadecimal a nd string representations. | #@cli : Print specified decimal integers into their binary, octal, hexadecimal a nd string representations. | |||
dec : | dec : | |||
e[^-1] "Convert decimal integer"${arg\ 1+($#>1),"",s}" '${^0}' to binary '"${d ec2bin\ ${^0}}"',"\ | e[^-1] "Convert decimal integer"${arg\ 1+($#>1),"",s}" '${^0}' to binary '"${d ec2bin\ ${^0}}"',"\ | |||
" octal '"${dec2oct\ ${^0}}"', hexadecimal '"${dec2hex\ ${^0}}"' and s tring '"${dec2str\ ${^0}}"'." | " octal '"${dec2oct\ ${^0}}"', hexadecimal '"${dec2hex\ ${^0}}"' and s tring '"${dec2str\ ${^0}}"'." | |||
#@cli dec2str : decimal_int1,... | #@cli dec2str : decimal_int1,... | |||
#@cli : Convert specifial decimal integers into its string representation. | #@cli : Convert specifial decimal integers into its string representation. | |||
dec2str : | dec2str : | |||
skipping to change at line 28849 | skipping to change at line 28867 | |||
#@cli rgba | #@cli rgba | |||
#@cli : Return a random int-valued RGBA color. | #@cli : Return a random int-valued RGBA color. | |||
rgba : | rgba : | |||
u {round(u(255))},{round(u(255))},{round(u(255))},{round(u(255))} | u {round(u(255))},{round(u(255))},{round(u(255))},{round(u(255))} | |||
RGBA : rgba | RGBA : rgba | |||
#@cli shell_cols | #@cli shell_cols | |||
#@cli : Return the estimated number of columns of the current shell. | #@cli : Return the estimated number of columns of the current shell. | |||
shell_cols : | shell_cols : | |||
if ${-is_windows} u 80 | if ${-is_windows}" || "${-is_macos} u 80 | |||
else | else | |||
file_rand filename=${} | file_rand filename=${} | |||
l[] cols=80 x "tput cols > "$filename it $filename if isint({t}) cols={{t}} fi rm onfail cols=80 rm endl | l[] cols=80 x "tput cols > "$filename it $filename if isint({t}) cols={{t}} fi rm onfail cols=80 rm endl | |||
delete $filename | delete $filename | |||
u $cols | u $cols | |||
fi | fi | |||
#@cli size_value | #@cli size_value | |||
#@cli : Return the size (in bytes) of an image value. | #@cli : Return the size (in bytes) of an image value. | |||
size_value : | size_value : | |||
skipping to change at line 35408 | skipping to change at line 35426 | |||
#@gui : - <b>2017/10/09</b> : version <i>2.1.0</i>.\n | #@gui : - <b>2017/10/09</b> : version <i>2.1.0</i>.\n | |||
#@gui : - <b>2018/02/15</b> : version <i>2.2.0</i>.\n | #@gui : - <b>2018/02/15</b> : version <i>2.2.0</i>.\n | |||
#@gui : - <b>2018/06/21</b> : version <i>2.3.0</i>.\n | #@gui : - <b>2018/06/21</b> : version <i>2.3.0</i>.\n | |||
#@gui : - <b>2018/10/04</b> : version <i>2.4.0</i>.\n | #@gui : - <b>2018/10/04</b> : version <i>2.4.0</i>.\n | |||
#@gui : - <b>2019/03/15</b> : version <i>2.5.0</i>.\n | #@gui : - <b>2019/03/15</b> : version <i>2.5.0</i>.\n | |||
#@gui : - <b>2019/04/29</b> : version <i>2.6.0</i>.\n | #@gui : - <b>2019/04/29</b> : version <i>2.6.0</i>.\n | |||
#@gui : - <b>2019/08/14</b> : version <i>2.7.0</i>.\n | #@gui : - <b>2019/08/14</b> : version <i>2.7.0</i>.\n | |||
#@gui : - <b>2019/12/04</b> : version <i>2.8.0</i>.\n | #@gui : - <b>2019/12/04</b> : version <i>2.8.0</i>.\n | |||
#@gui : - <b>2020/03/28</b> : version <i>2.9.0</i>.\n | #@gui : - <b>2020/03/28</b> : version <i>2.9.0</i>.\n | |||
#@gui : - <b>2021/12/09</b> : version <i>3.0.0</i>.\n | #@gui : - <b>2021/12/09</b> : version <i>3.0.0</i>.\n | |||
#@gui : - <span foreground="purple"><b>2022/01/13</b> : version <i>3.0.1</i> (Cu | #@gui : - <span foreground="purple"><b>2022/01/18</b> : version <i>3.0.2</i> (Cu | |||
rrent stable).</span>\n | rrent stable).</span>\n | |||
##@gui : - <b>2021/01/xx</b> : version <i>3.0.2</i> (Current pre-release).\n | ##@gui : - <b>2021/01/15</b> : version <i>3.0.2</i> (Current pre-release).\n | |||
#@gui : "} | #@gui : "} | |||
#@gui : sep = separator() | #@gui : sep = separator() | |||
#@gui : url = link{"View changelog to upcoming minor version (3.1)","https://dis cuss.pixls.us/t/on-the-road-to-3-1"} | #@gui : url = link{"View changelog to upcoming minor version (3.1)","https://dis cuss.pixls.us/t/on-the-road-to-3-1"} | |||
#@gui : url = link{"View latest major changelog (3.0)","https://discuss.pixls.us /t/release-of-gmic-3-0"} | #@gui : url = link{"View latest major changelog (3.0)","https://discuss.pixls.us /t/release-of-gmic-3-0"} | |||
#@gui What's New? : _none_,fx_whatsnew_preview | #@gui What's New? : _none_,fx_whatsnew_preview | |||
#@gui : note = note("Here you'll find a list of filter additions and deletions i n the plug-in, since your last visit. | #@gui : note = note("Here you'll find a list of filter additions and deletions i n the plug-in, since your last visit. | |||
#@gui : When you have seen what's new, press the <b>Got It!</b> button to reset the list of changes.") | #@gui : When you have seen what's new, press the <b>Got It!</b> button to reset the list of changes.") | |||
#@gui : sep = separator() | #@gui : sep = separator() | |||
#@gui : nochange = value(0)_0+ | #@gui : nochange = value(0)_0+ | |||
skipping to change at line 35953 | skipping to change at line 35971 | |||
#@gui : "Backward Vertical","Duplicate Top","Duplicate Left","Duplicate Bottom", "Duplicate Right", | #@gui : "Backward Vertical","Duplicate Top","Duplicate Left","Duplicate Bottom", "Duplicate Right", | |||
#@gui : "Duplicate Horizontal","Duplicate Vertical","Checkered","Checkered Inver se") | #@gui : "Duplicate Horizontal","Duplicate Vertical","Checkered","Checkered Inver se") | |||
#@gui : Preview Split = point(50,50,0,0,200,200,200,0,10)_0 | #@gui : Preview Split = point(50,50,0,0,200,200,200,0,10)_0 | |||
#@gui : sep = separator() | #@gui : sep = separator() | |||
#@gui : note = note{"<small><b>Note:</b> This filter helps in converting your in put pattern as a <b>seamless</b> | #@gui : note = note{"<small><b>Note:</b> This filter helps in converting your in put pattern as a <b>seamless</b> | |||
#@gui : (a.k.a periodic) texture.</small>"} | #@gui : (a.k.a periodic) texture.</small>"} | |||
#@gui : sep = separator() | #@gui : sep = separator() | |||
#@gui : note = note("<small>Author: <i>David Tschumperlé</i>. Latest Update : <i>2015/24/02</i>.</small>") | #@gui : note = note("<small>Author: <i>David Tschumperlé</i>. Latest Update : <i>2015/24/02</i>.</small>") | |||
fx_make_seamless : | fx_make_seamless : | |||
repeat $! l[$>] | repeat $! l[$>] | |||
if $1 +b {20.5-$1/50}% -[0] [1] fc. ${average_colors.} + fi | if $1 +b {20.5-$1/50}% -[0] [1] fc. ${average_vectors.} + fi | |||
endl done | endl done | |||
periodize_poisson c 0,255 | periodize_poisson c 0,255 | |||
fx_make_seamless_preview : | fx_make_seamless_preview : | |||
u={arg($3,2,1,2,3,4)} v={arg($3,1,2,2,3,4)} | u={arg($3,2,1,2,3,4)} v={arg($3,1,2,2,3,4)} | |||
gui_split_preview "if !$2 fx_make_seamless $* fi if $3 array "$u","$v" fi",${- 3--1} | gui_split_preview "if !$2 fx_make_seamless $* fi if $3 array "$u","$v" fi",${- 3--1} | |||
#@gui Make Seamless [Patch-Based] : fx_frame_seamless, fx_frame_seamless_preview (0) | #@gui Make Seamless [Patch-Based] : fx_frame_seamless, fx_frame_seamless_preview (0) | |||
#@gui : Frame Size = int(32,0,256) | #@gui : Frame Size = int(32,0,256) | |||
#@gui : Patch Size = int(9,3,64) | #@gui : Patch Size = int(9,3,64) | |||
skipping to change at line 35982 | skipping to change at line 36000 | |||
#@gui : "Backward Vertical","Duplicate Top","Duplicate Left","Duplicate Bottom", "Duplicate Right", | #@gui : "Backward Vertical","Duplicate Top","Duplicate Left","Duplicate Bottom", "Duplicate Right", | |||
#@gui : "Duplicate Horizontal","Duplicate Vertical","Checkered","Checkered Inver se") | #@gui : "Duplicate Horizontal","Duplicate Vertical","Checkered","Checkered Inver se") | |||
#@gui : Preview Split = point(50,50,0,0,200,200,200,0,10)_0 | #@gui : Preview Split = point(50,50,0,0,200,200,200,0,10)_0 | |||
#@gui : sep = separator() | #@gui : sep = separator() | |||
#@gui : note = note{"<small><b>Note:</b> This filter helps in converting your in put pattern as a <b>seamless</b> | #@gui : note = note{"<small><b>Note:</b> This filter helps in converting your in put pattern as a <b>seamless</b> | |||
#@gui : (a.k.a periodic) texture.</small>"} | #@gui : (a.k.a periodic) texture.</small>"} | |||
#@gui : sep = separator() | #@gui : sep = separator() | |||
#@gui : note = note("<small>Author: <i>David Tschumperlé</i>. Latest Update : <i>2015/15/12</i>.</small>") | #@gui : note = note("<small>Author: <i>David Tschumperlé</i>. Latest Update : <i>2015/15/12</i>.</small>") | |||
fx_frame_seamless : | fx_frame_seamless : | |||
repeat $! l[$>] | repeat $! l[$>] | |||
if $5 +b {20.5-$5/50}% -[0] [1] fc. ${average_colors.} + fi | if $5 +b {20.5-$5/50}% -[0] [1] fc. ${average_vectors.} + fi | |||
endl done | endl done | |||
frame_seamless ${1-4} c 0,255 | frame_seamless ${1-4} c 0,255 | |||
fx_frame_seamless_preview : | fx_frame_seamless_preview : | |||
u={arg($7,2,1,2,3,4)} v={arg($7,1,2,2,3,4)} | u={arg($7,2,1,2,3,4)} v={arg($7,1,2,2,3,4)} | |||
gui_split_preview "if !$6 fx_frame_seamless $* fi if $7 array "$u","$v" fi",${ -3--1} | gui_split_preview "if !$6 fx_frame_seamless $* fi if $7 array "$u","$v" fi",${ -3--1} | |||
#@gui Ministeck : fx_ministeck, fx_ministeck_preview(1) | #@gui Ministeck : fx_ministeck, fx_ministeck_preview(1) | |||
#@gui : Number of Colors = int(8,2,24) | #@gui : Number of Colors = int(8,2,24) | |||
#@gui : Resolution (px) = int(64,16,256) | #@gui : Resolution (px) = int(64,16,256) | |||
skipping to change at line 40895 | skipping to change at line 40913 | |||
#@gui : "Duplicate Horizontal","Duplicate Vertical","Checkered","Checkered Inver se") | #@gui : "Duplicate Horizontal","Duplicate Vertical","Checkered","Checkered Inver se") | |||
#@gui : Preview Split = point(50,50,0,0,200,200,200,0,10)_0 | #@gui : Preview Split = point(50,50,0,0,200,200,200,0,10)_0 | |||
#@gui : sep = separator() | #@gui : sep = separator() | |||
#@gui : note = note("<small>Author: <i>David Tschumperlé</i>. Latest Update : <i>2018/07/18</i>.</small>") | #@gui : note = note("<small>Author: <i>David Tschumperlé</i>. Latest Update : <i>2018/07/18</i>.</small>") | |||
fx_mix_pca : | fx_mix_pca : | |||
repeat $! l[$>] split_opacity l[0] to_rgb | repeat $! l[$>] split_opacity l[0] to_rgb | |||
# Get image covariance (and remember it to speed up multiple calls of the fi lter). | # Get image covariance (and remember it to speed up multiple calls of the fi lter). | |||
if [$14]==round(stats()[0,4],0.1) _avg={[$15][0,3]} C={[$15][3,9]} status= | if [$14]==round(stats()[0,4],0.1) _avg={[$15][0,3]} C={[$15][3,9]} status= | |||
else | else | |||
+rr2d 256,256,0,2 C=${"covariance_colors. _avg"} rm. | +rr2d 256,256,0,2 C=${"covariance_vectors. _avg"} rm. | |||
__status="{$1}{$2}{$3}{$4}"\ | __status="{$1}{$2}{$3}{$4}"\ | |||
"{$5}{$6}{$7}{$8}"\ | "{$5}{$6}{$7}{$8}"\ | |||
"{$9}{$10}{$11}{$12}"\ | "{$9}{$10}{$11}{$12}"\ | |||
"${13}"\ | "${13}"\ | |||
"{"{round(stats()[0,4],0.1)}"}"\ | "{"{round(stats()[0,4],0.1)}"}"\ | |||
"{"$_avg,$C"}"\ | "{"$_avg,$C"}"\ | |||
"{$16}{${17,18}}" | "{$16}{${17,18}}" | |||
fi | fi | |||
# Find value ranges for gamma correction. | # Find value ranges for gamma correction. | |||
skipping to change at line 47656 | skipping to change at line 47674 | |||
#@gui : note = note("<small>This filter is based on the work of <i>Bruno Galerne </i>, <i>Yann Gousseau</i> and | #@gui : note = note("<small>This filter is based on the work of <i>Bruno Galerne </i>, <i>Yann Gousseau</i> and | |||
#@gui : <i>Jean-Michel Morel</i>.</small>") | #@gui : <i>Jean-Michel Morel</i>.</small>") | |||
#@gui : sep = separator() | #@gui : sep = separator() | |||
#@gui : url = link("Click here for a detailed description of this filter.",\ | #@gui : url = link("Click here for a detailed description of this filter.",\ | |||
# "http://gimpchat.com/viewtopic.php?f=28&t=10141") | # "http://gimpchat.com/viewtopic.php?f=28&t=10141") | |||
#@gui : sep = separator() | #@gui : sep = separator() | |||
#@gui : note = note("<small>Authors: <i>David Tschumperlé</i> and <i>Jérome Boul anger</i>. | #@gui : note = note("<small>Authors: <i>David Tschumperlé</i> and <i>Jérome Boul anger</i>. | |||
#@gui : Latest Update: <i>2014/09/04</i>.</small>") | #@gui : Latest Update: <i>2014/09/04</i>.</small>") | |||
fx_syntexturize : | fx_syntexturize : | |||
repeat $! l[$>] | repeat $! l[$>] | |||
if $3 +b {20.5-$3/50}% -[0] [1] fc. ${average_colors.} + c 0,255 fi | if $3 +b {20.5-$3/50}% -[0] [1] fc. ${average_vectors.} + c 0,255 fi | |||
syntexturize $1,$2 | syntexturize $1,$2 | |||
endl done | endl done | |||
fx_syntexturize_preview : | fx_syntexturize_preview : | |||
gui_split_preview "fx_syntexturize 100%,100%,$3",${-3--1} | gui_split_preview "fx_syntexturize 100%,100%,$3",${-3--1} | |||
#@gui Resynthetize Texture [Patch-Based] : syntexturize_matchpatch, fx_syntextur ize_matchpatch_preview(1) | #@gui Resynthetize Texture [Patch-Based] : syntexturize_matchpatch, fx_syntextur ize_matchpatch_preview(1) | |||
#@gui : Width = _int(512,32,8192) | #@gui : Width = _int(512,32,8192) | |||
#@gui : Height = _int(512,32,8192) | #@gui : Height = _int(512,32,8192) | |||
#@gui : Number of Scales = int(0,0,16) | #@gui : Number of Scales = int(0,0,16) | |||
skipping to change at line 47684 | skipping to change at line 47702 | |||
#@gui : "Duplicate Horizontal","Duplicate Vertical","Checkered","Checkered Inver se") | #@gui : "Duplicate Horizontal","Duplicate Vertical","Checkered","Checkered Inver se") | |||
#@gui : Preview Split = point(50,50,0,0,200,200,200,0,10)_0 | #@gui : Preview Split = point(50,50,0,0,200,200,200,0,10)_0 | |||
#@gui : sep = separator() | #@gui : sep = separator() | |||
#@gui : note = note{"<small><b>Note:</b> This filter tries to re-synthetize an i nput texture image onto a | #@gui : note = note{"<small><b>Note:</b> This filter tries to re-synthetize an i nput texture image onto a | |||
#@gui : bigger output image (with an arbitrary size). | #@gui : bigger output image (with an arbitrary size). | |||
#@gui : Beware, this filter is quite slow to compute!</small>"} | #@gui : Beware, this filter is quite slow to compute!</small>"} | |||
#@gui : sep = separator() | #@gui : sep = separator() | |||
#@gui : note = note("<small>Author: <i>David Tschumperlé</i>. Latest Update : <i>2015/22/10</i>.</small>") | #@gui : note = note("<small>Author: <i>David Tschumperlé</i>. Latest Update : <i>2015/22/10</i>.</small>") | |||
_fx_syntexturize_matchpatch_preview : | _fx_syntexturize_matchpatch_preview : | |||
repeat $! l[$>] | repeat $! l[$>] | |||
if $7 +b {20.5-$7/50}% -[0] [1] fc. ${average_colors.} + c 0,255 fi | if $7 +b {20.5-$7/50}% -[0] [1] fc. ${average_vectors.} + c 0,255 fi | |||
w={w} h={h} | w={w} h={h} | |||
syntexturize_matchpatch 100%,100%,${3--1} | syntexturize_matchpatch 100%,100%,${3--1} | |||
to_rgba r $w,$h,1,4,0,0,0.5,0.5 | to_rgba r $w,$h,1,4,0,0,0.5,0.5 | |||
endl done | endl done | |||
fx_syntexturize_matchpatch_preview : | fx_syntexturize_matchpatch_preview : | |||
gui_split_preview "_fx_syntexturize_matchpatch_preview ${1--2}",${-3--1} | gui_split_preview "_fx_syntexturize_matchpatch_preview ${1--2}",${-3--1} | |||
#@gui Rorschach : fx_rorschach, fx_rorschach | #@gui Rorschach : fx_rorschach, fx_rorschach | |||
#@gui : Scale = float(3,0,10) | #@gui : Scale = float(3,0,10) | |||
End of changes. 38 change blocks. | ||||
48 lines changed or deleted | 66 lines changed or added |