246 lines
23 KiB
HTML
246 lines
23 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>MGImageProcesser Command</title>
|
|
<meta name="generator" content="Help & Manual" />
|
|
<meta name="keywords" content="API,ImageProcesser,MGImageProcessercommand" />
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<link type="text/css" href="default.css" rel="stylesheet" />
|
|
<style type="text/css">
|
|
body { margin: 0px; background: #F8F8F8; }
|
|
</style>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="helpman_settings.js"></script>
|
|
<script type="text/javascript" src="helpman_topicinit.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
HMSyncTOC("index.html", "mgimageprocesser.htm");
|
|
</script>
|
|
<script type="text/javascript" src="highlight.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){highlight();});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
|
|
|
|
<table style="width:100%; border:none; border-spacing:0px; padding:0px; background:#D0D0D0">
|
|
<tr style="vertical-align:middle">
|
|
<td style="text-align:right">
|
|
<a href="welcome.htm"><img border="0" src="../common/images/MGtoolsHelp_Home.gif" width="34" height="22" alt="Home" /></a>
|
|
<a href="mgpickerlicence.htm"><img border="0" src="../common/images/MGtoolsHelp_previous.gif" width="34" height="22" alt="Previous" /></a>
|
|
<a href="commandbuttonpresets.htm"><img border="0" src="../common/images/MGtoolsHelp_next.gif" width="34" height="22" alt="Next" /></a>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
|
|
<!-- Placeholder for topic body. -->
|
|
<table style="width:100%;border:none;border-spacing:0px"><tr style="vertical-align:top"><td style="text-align:left;padding:5px">
|
|
<div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
|
<tr>
|
|
<td style="vertical-align:middle; height:8px; padding:1px; border:none"><p><span style="font-family: 'Times New Roman',Times,Georgia,serif; font-weight: bold;">命令</span><span style="font-family: 'Times New Roman',Times,Georgia,serif;"> (MEL/Python)</span></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="vertical-align:middle; height:5px; padding:1px; border:none"><h1 class="p_Heading1" style="margin: 19px 0 19px 0;"><span class="f_Heading1" style="font-size: 24pt; font-family: 'Times New Roman',Times,Georgia,serif;">MGImageProcesser</span></h1>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<p class="p_Normal" style="margin: 14px 0 0 0;"><span style="font-family: 'Times New Roman',Times,Georgia,serif;">跳转到: </span><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;"><a href="mgpicker.htm#synopsis" class="topiclink">概要</a>. <a href="mgpicker.htm#examples" class="topiclink">MEL例子</a>. <a href="mgpickeritem.htm#pyexamples" class="topiclink">Python例子</a>.</span></p>
|
|
<p class="p_Normal" style="margin: 19px 0 0 0;"><a id="synopsis" class="hmanchor"></a><span style="font-size: 14pt; font-family: 'Times New Roman',Times,Georgia,serif; font-weight: bold;">概要</span></p>
|
|
<p class="p_Normal" style="margin: 19px 0 0 0;"><span style="font-family: 'Courier New',Courier,monospace;">MGImageProcesser (string, [<a href="mgimageprocesser.htm#dimension" class="topiclink">currentStyleName</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">boolean</span><span style="font-family: 'Courier New',Courier,monospace;">], [<a href="mgimageprocesser.htm#dimension" class="topiclink">dimension</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">boolean</span><span style="font-family: 'Courier New',Courier,monospace;">], [<a href="mgimageprocesser.htm#processoption" class="topiclink">processOption</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">string</span><span style="font-family: 'Courier New',Courier,monospace;">], [<a href="mgimageprocesser.htm#resize" class="topiclink">resize</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">string</span><span style="font-family: 'Courier New',Courier,monospace;">], [<a href="mgimageprocesser.htm#style" class="topiclink">style</a>=</span><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">string</span><span style="font-family: 'Courier New',Courier,monospace;">])</span></p>
|
|
<p class="p_Normal" style="margin: 19px 0 0 0;"><span style="font-size: 9pt; font-family: 'Times New Roman',Times,Georgia,serif; font-style: italic;">备注: Strings代表图片文件完整路径, 而参数则必须以逗号分隔。这是在概要里没有说明的。</span></p>
|
|
<p class="p_Normal" style="margin: 14px 0 14px 0;"><span style="font-size: 12pt; font-family: 'Times New Roman',Times,Georgia,serif;">MGImageProcesser</span><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif; font-weight: bold;">不可撤消</span><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">, 可以查询且可以编辑</span><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">。</span></p>
|
|
<p><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">这个命令主要用来处理图片。</span></p>
|
|
<p class="p_Normal"> </p>
|
|
<div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
|
<tr>
|
|
<td style="vertical-align:bottom; width:266px; background-color:#CCCCCC; padding:1px; border:none"><p><span style="font-family: 'Times New Roman',Times,Georgia,serif; font-weight: bold;">长名 (短名)</span></p>
|
|
</td>
|
|
<td style="vertical-align:bottom; width:125px; background-color:#CCCCCC; padding:1px; border:none"><p><span style="font-family: 'Times New Roman',Times,Georgia,serif; font-style: italic; font-weight: bold;">参数类型</span></p>
|
|
</td>
|
|
<td style="vertical-align:bottom; background-color:#CCCCCC; padding:1px; border:none"><p><span style="font-family: 'Times New Roman',Times,Georgia,serif; font-weight: bold;">属性</span></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="vertical-align:top; width:266px; background-color:#EEEEEE; padding:1px; border:none"><p><a id="currentstylename" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-currentStyleName</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-csn</span><span style="font-family: 'Courier New',Courier,monospace;">)</span><img alt="v2_transparent" width="34" height="12" style="margin:0;width:34px;height:12px;border:none" src="v2_transparent.png"/></p>
|
|
</td>
|
|
<td style="vertical-align:top; width:125px; background-color:#EEEEEE; padding:1px; border:none"><p><span style="color: #000000;"> </span></p>
|
|
</td>
|
|
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="query" title="query" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="query.gif"/></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
|
<tr>
|
|
<td style="vertical-align:top; width:40px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="color: #000000;"> </span></p>
|
|
</td>
|
|
<td style="vertical-align:middle; width:946px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">仅供内部使用,用来查询当前界面上使用的图片处理风格的名字。</span></p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="vertical-align:top; width:266px; background-color:#EEEEEE; padding:1px; border:none"><p><a id="dimension" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-dimension</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-d</span><span style="font-family: 'Courier New',Courier,monospace;">)</span></p>
|
|
</td>
|
|
<td style="vertical-align:top; width:125px; background-color:#EEEEEE; padding:1px; border:none"><p><span style="color: #000000;"> </span></p>
|
|
</td>
|
|
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="query" title="query" width="13" height="16" style="margin:2px 2px 2px 2px;width:13px;height:16px;border:none" src="query.gif"/></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
|
<tr>
|
|
<td style="vertical-align:top; width:40px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="color: #000000;"> </span></p>
|
|
</td>
|
|
<td style="vertical-align:middle; width:946px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">这个标签只能用于查询指定图片的长宽,返回整数数组。</span></p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="vertical-align:top; width:266px; background-color:#EEEEEE; padding:1px; border:none"><p><a id="processoption" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-processOption</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-po</span><span style="font-family: 'Courier New',Courier,monospace;">)</span></p>
|
|
</td>
|
|
<td style="vertical-align:top; width:125px; background-color:#EEEEEE; padding:1px; border:none"><p><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">string</span></p>
|
|
</td>
|
|
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="create" width="13" height="16" style="margin:0;width:13px;height:16px;border:none" src="create.gif"/><img alt="edit" width="13" height="16" style="margin:0;width:13px;height:16px;border:none" src="edit.gif"/></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
|
<tr>
|
|
<td style="vertical-align:top; width:40px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="color: #000000;"> </span></p>
|
|
</td>
|
|
<td style="vertical-align:middle; width:946px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">通过指定处理配置字符窜来处理图片,这个配置字符窜每行都是“配置名=配置数值”这样的格式,并用换行符相连,比如:</span></p>
|
|
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">invert = 0</span></p>
|
|
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">grayscale = 1</span></p>
|
|
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">brightness = 0</span></p>
|
|
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">contrast = 0</span></p>
|
|
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">saturation = 0</span></p>
|
|
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">blur = 0</span></p>
|
|
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">opacity = 255</span></p>
|
|
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">bgcolor = 0,0,0</span></p>
|
|
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">hTile = 1</span></p>
|
|
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">hTileGap = 0</span></p>
|
|
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">vTile = 1</span></p>
|
|
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">vTileGap = 0</span></p>
|
|
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">这些配置名的大小写不区分。每个配置的取值范围如下:</span></p>
|
|
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">invert: [0~1]</span></p>
|
|
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">grayscale: [0~1]</span></p>
|
|
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">brightness: [-255,255]</span></p>
|
|
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">contrast: [-255,255]</span></p>
|
|
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">saturation: [-255,255]</span></p>
|
|
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">blur: [0~18]</span></p>
|
|
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">opacity: [0~255]</span></p>
|
|
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">bgcolor: [0~255,0~255,0~255]</span></p>
|
|
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">hTile: [0~10]</span></p>
|
|
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">hTileGap: [0~100]</span></p>
|
|
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">vTile: [0~10]</span></p>
|
|
<p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">vTileGap: [0~100]</span></p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="vertical-align:top; width:266px; background-color:#EEEEEE; padding:1px; border:none"><p><a id="resize" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-resize</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-r</span><span style="font-family: 'Courier New',Courier,monospace;">)</span></p>
|
|
</td>
|
|
<td style="vertical-align:top; width:125px; background-color:#EEEEEE; padding:1px; border:none"><p><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">string</span></p>
|
|
</td>
|
|
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="create" width="13" height="16" style="margin:0;width:13px;height:16px;border:none" src="create.gif"/><img alt="edit" width="13" height="16" style="margin:0;width:13px;height:16px;border:none" src="edit.gif"/></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
|
<tr>
|
|
<td style="vertical-align:top; width:40px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="color: #000000;"> </span></p>
|
|
</td>
|
|
<td style="vertical-align:middle; width:942px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">指定"长:宽"这样的字符窜来缩放图片,注意图片的长宽比不会被改变。</span></p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="vertical-align:top; width:266px; background-color:#EEEEEE; padding:1px; border:none"><p><a id="style" class="hmanchor"></a><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-style</span><span style="font-family: 'Courier New',Courier,monospace;">(</span><span style="font-family: 'Courier New',Courier,monospace; font-weight: bold;">-s</span><span style="font-family: 'Courier New',Courier,monospace;">)</span></p>
|
|
</td>
|
|
<td style="vertical-align:top; width:125px; background-color:#EEEEEE; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
|
<tr>
|
|
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><span style="font-family: 'Courier New',Courier,monospace; font-style: italic;">string</span></p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
<td style="vertical-align:top; background-color:#EEEEEE; padding:1px; border:none"><p><img alt="create" width="13" height="16" style="margin:0;width:13px;height:16px;border:none" src="create.gif"/><img alt="edit" width="13" height="16" style="margin:0;width:13px;height:16px;border:none" src="edit.gif"/></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="3" style="vertical-align:middle; padding:1px; border:none"><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 0 0;"><table style="width:100%; border:none; border-spacing:2px;">
|
|
<tr>
|
|
<td style="vertical-align:top; width:40px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="color: #000000;"> </span></p>
|
|
</td>
|
|
<td style="vertical-align:middle; width:946px; padding:1px; border:none"><p style="line-height: 1.38;"><span style="font-size: 11pt; font-family: 'Times New Roman',Times,Georgia,serif;">仅供内部使用。通过指定一个外部的图片样式文件路径来处理图片。</span></p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<p class="p_Normal"> </p>
|
|
<hr style="height:2px; color:#CCCCCC; border-width:0; background-color:#cccccc;" /><div style="text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 10px 0 0 0;"><table style="background-color:#eeeeee; border:none; border-spacing:1px;">
|
|
<tr>
|
|
<td style="vertical-align:top; padding:4px; border:none"><p><img alt="create" width="13" height="16" style="margin:0;width:13px;height:16px;border:none" src="create.gif"/><span class="f_ImageCaption"> </span><span style="font-family: 'Times New Roman',Times,Georgia,serif;">标签可以在创建模式中使用</span></p>
|
|
</td>
|
|
<td style="vertical-align:top; padding:4px; border:none"><p><img alt="edit" width="13" height="16" style="margin:0;width:13px;height:16px;border:none" src="edit.gif"/><span class="f_ImageCaption"> </span><span style="font-family: 'Times New Roman',Times,Georgia,serif;">标签可以在编辑模式中使用</span></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="vertical-align:top; padding:4px; border:none"><p><img alt="query" width="13" height="16" style="margin:0;width:13px;height:16px;border:none" src="query.gif"/><span class="f_ImageCaption"> </span><span style="font-family: 'Times New Roman',Times,Georgia,serif;">标签可以在查询模式中使用</span></p>
|
|
</td>
|
|
<td style="vertical-align:top; padding:4px; border:none"><p><img alt="multiuse" width="13" height="16" style="margin:0;width:13px;height:16px;border:none" src="multiuse.gif"/><span class="f_ImageCaption"> </span><span style="font-family: 'Times New Roman',Times,Georgia,serif;">标签可以在一条命令中多次使用</span></p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<p style="margin: 19px 0 0 0;"><a id="examples" class="hmanchor"></a><span style="font-size: 14pt; font-family: 'Times New Roman',Times,Georgia,serif; font-weight: bold;">MEL例子</span></p>
|
|
<p class="p_Normal" style="line-height: 1.0; white-space: nowrap; margin: 19px 0 0 0;"><span style="font-family: 'Courier New',Courier,monospace;">//get the size of image in int array:</span><br />
|
|
<span style="font-family: 'Courier New',Courier,monospace;">MGImageProcesser -q -dimension "D:/test/Penguins.jpg";</span></p>
|
|
<p class="p_Normal" style="line-height: 1.0; white-space: nowrap; margin: 19px 0 0 0;"><span style="font-family: 'Courier New',Courier,monospace;">//backup the original image befor process it:</span><br />
|
|
<span style="font-family: 'Courier New',Courier,monospace;">sysFile -cp "D:/test/Penguins_orginal.jpg" "D:/test/Penguins.jpg";</span></p>
|
|
<p class="p_Normal" style="line-height: 1.0; white-space: nowrap; margin: 19px 0 0 0;"><span style="font-family: 'Courier New',Courier,monospace;">//now process the image, the image will be changed:</span><br />
|
|
<span style="font-family: 'Courier New',Courier,monospace;">MGImageProcesser -processOption "grayscale=1\nblur=10" "D:/test/Penguins.jpg";</span></p>
|
|
<p style="margin: 19px 0 0 0;"><a id="pyexamples" class="hmanchor"></a><span style="font-size: 14pt; font-family: 'Times New Roman',Times,Georgia,serif; font-weight: bold;">Python例子</span></p>
|
|
<p style="margin: 19px 0 0 0;"><span style="font-family: 'Courier New',Courier,monospace;">from maya import cmds</span></p>
|
|
<p class="p_Normal" style="line-height: 1.0; white-space: nowrap; margin: 19px 0 0 0;"><span style="font-family: 'Courier New',Courier,monospace;">#get the size of image in int array:</span><br />
|
|
<span style="font-family: 'Courier New',Courier,monospace;">cmds.MGImageProcesser("D:/test/Penguins.jpg", q=True, dimension=True)</span></p>
|
|
<p class="p_Normal" style="line-height: 1.0; white-space: nowrap; margin: 19px 0 0 0;"><span style="font-family: 'Courier New',Courier,monospace;">#backup the original image befor process it:</span><br />
|
|
<span style="font-family: 'Courier New',Courier,monospace;">cmds.sysFile("D:/test/Penguins.jpg", cp="D:/test/Penguins_orginal.jpg")</span></p>
|
|
<p class="p_Normal" style="line-height: 1.0; white-space: nowrap; margin: 19px 0 0 0;"><span style="font-family: 'Courier New',Courier,monospace;">#now process the image, the image will be changed:</span><br />
|
|
<span style="font-family: 'Courier New',Courier,monospace;">cmds.MGImageProcesser("D:/test/Penguins.jpg", processOption="grayscale=1\nblur=10")</span></p>
|
|
|
|
</td></tr></table>
|
|
<table height="30" width="100%" border="0" cellspacing="" cellpadding="0" bgcolor="#D0D0D0">
|
|
<tr valign="bottom" bgcolor="#D0D0D0" >
|
|
<td align="left" valign="middle" >
|
|
<a href="welcome.htm"><img border="0" src="../common/images/MGtoolsHelp_Home.gif" width="34" height="22" alt="Home" /></a>
|
|
<a href="mgpickerlicence.htm"><img border="0" src="../common/images/MGtoolsHelp_previous.gif" width="34" height="22" alt="Previous" /></a>
|
|
<a href="commandbuttonpresets.htm"><img border="0" src="../common/images/MGtoolsHelp_next.gif" width="34" height="22" alt="Next" /></a></td>
|
|
</tr>
|
|
</table>
|
|
|
|
</body>
|
|
</html>
|