高效率批量图片处理解决方案

本文还有配套的精品资源,点击获取 menu-r.4af5f7ec.gif

简介:在图像处理中,批量改图工具可以显著提升用户工作效率,特别是对摄影师、设计师等行业人士。本工具能够快速调整图片分辨率与尺寸,并保持图片纵横比,以适应不同需求如打印或屏幕显示。批量改图工具的命名简洁明了,通常以“resizer.exe”为执行程序名,用户可通过它批量设定尺寸,同时可能包含其他高级功能如格式转换、水印添加、亮度对比度调整等,极大地增强了图片处理的灵活性和效率。

1. 图片处理的基础知识

在数字图像的世界里,分辨率与尺寸是构建图像文件基础的两大支柱。分辨率指的是图像中每英寸长度内的像素点数,而尺寸则是以像素为单位描述的图像的宽度和高度。在本章节中,我们不仅将探讨如何调整图片的分辨率与尺寸,还将学习如何在调整过程中保持图片的纵横比不变,以及如何设定批量图片的尺寸以满足特定的需求。

图片分辨率与尺寸调整的核心在于平衡图像的显示质量与文件大小,这对于网络上传、打印输出和屏幕显示等场景尤为重要。例如,在保持图片纵横比的同时缩小图像尺寸,可以有效减小文件大小而不失图像的完整性。

此外,针对需要处理大量图片的情况,我们也会学习如何利用脚本或专用软件来批量设定图片尺寸,这大大提高了工作效率。接下来,让我们一起深入探索图片处理的奥秘,发掘更多实用技巧。

2. 批量图片处理工具的使用

在当今的信息时代,图片已成为网络内容的重要组成部分。随着图片数量的激增,对图片进行快速高效的批量处理变得尤为重要。在本章中,我们将深入探讨如何使用一个名为“resizer.exe”的批量图片处理工具来满足这一需求。我们将首先介绍如何安装和配置该工具,然后展示如何设置参数以应用于批量任务,并最终深入了解如何通过高级配置技巧来提升使用体验。

2.1 程序安装和环境配置

2.1.1 下载与安装步骤

在开始使用“resizer.exe”之前,我们需要先进行下载与安装。由于软件版本更新频繁,建议访问官方网站获取最新版本。以下是基本的安装步骤:

  1. 访问官方网站或可信的第三方软件仓库下载“resizer.exe”安装包。
  2. 双击下载的安装包,启动安装向导。
  3. 按照安装向导的提示完成安装。在这个过程中,可以自定义安装路径、选择组件等。
  4. 安装完成后,需要重启计算机以使设置生效。
2.1.2 环境变量与权限设置

为了能在任何目录下执行“resizer.exe”,需要将该程序的路径添加到系统的环境变量中。此外,为了确保能够正常运行,可能还需要对相应的权限进行配置。

  1. 找到“resizer.exe”安装的路径,例如: C:\Program Files\Resizer\
  2. 右键点击“我的电脑”或“此电脑”,选择“属性”。
  3. 进入“高级系统设置”,然后点击“环境变量”。
  4. 在“系统变量”中找到“Path”,选择编辑并添加 C:\Program Files\Resizer\
  5. 确保为“resizer.exe”设置了足够的权限,特别是当它需要访问网络或特定目录时。

2.2 常见的参数设置及应用

2.2.1 命令行参数详解

“resizer.exe”是一个功能强大的批量图片处理工具,它支持多种命令行参数,使得用户可以灵活地对图片进行批量处理。

以下是一些最常用的参数:

  • -resize : 指定图片大小,例如 -resize 1024x768
  • -format : 指定输出图片格式,例如 -format jpg
  • -out : 指定输出目录,例如 -out "C:\ProcessedImages"
  • -include : 指定需要处理的文件类型,例如 -include *.jpg
  • -exclude : 指定不需要处理的文件类型,例如 -exclude thumbs.db
2.2.2 批量任务脚本编写

要实现批量任务的自动化处理,编写脚本是一个非常好的选择。以下是一个简单的批处理脚本示例,用于将指定目录下的所有图片统一调整大小并转换为JPEG格式:

@echo off
setlocal enabledelayedexpansion
set "inputDir=C:\SourceImages"
set "outputDir=C:\ProcessedImages"

if not exist "%outputDir%" mkdir "%outputDir%"

for %%f in ("%inputDir%\*.jpg") do (
    resizer.exe -resize 800x600 -format jpg "%%f" -out "%outputDir%"
    echo Processed: "%%f"
)

echo All images processed.
endlocal

该脚本首先设置了输入和输出目录,然后遍历输入目录下的所有JPEG文件,使用 resizer.exe 进行处理,并将结果保存在输出目录下。

2.3 程序的高级配置技巧

2.3.1 配置文件的修改和应用

为了进一步定制“resizer.exe”的行为,用户可以编辑配置文件。通常,配置文件为XML或JSON格式,允许用户保存特定的设置,如尺寸、格式和其他处理选项,以便于重用。

例如,配置文件内容可能如下:

<?xml version="1.0" encoding="UTF-8"?>
<resizerSettings>
    <defaultResize>800x600</defaultResize>
    <defaultFormat>jpg</defaultFormat>
    <defaultQuality>85</defaultQuality>
</resizerSettings>

使用配置文件时,只需在命令行中指定配置文件路径,如:

resizer.exe -config "C:\resizerSettings.xml"
2.3.2 异常处理与日志记录

在进行批量图片处理时,难免会遇到各种异常情况,如读写权限问题、格式不支持等。在本小节中,我们将探讨如何进行异常处理并记录日志。

首先,我们可以对脚本进行改进,使其能够捕获和处理异常:

@echo off
setlocal enabledelayedexpansion

for %%f in ("%inputDir%\*.jpg") do (
    rem 尝试处理文件
    resizer.exe "%%f" || (
        echo Error processing "%%f"
        echo !errorlevel!
    )
    echo Processed: "%%f"
)

echo All images processed or errors noted.
endlocal

此外,日志记录是处理大型批量任务时不可或缺的。我们可以通过将输出重定向到一个日志文件中来记录详细的处理过程:

resizer.exe -log "C:\resizer.log"

这样,任何错误或警告信息都会被记录在日志文件中,便于后续问题排查。

以上是本章关于“resizer.exe”程序的安装、配置、参数使用和高级技巧的介绍。下一小节将深入探讨如何通过该程序实现批量图片的格式转换与图像质量调整。

3. 图片格式转换与图像质量调整

3.1 格式转换的原理与实践

在本节中,我们将探讨图片格式转换的原理,并通过实践来展示如何进行批量的格式转换。首先,我们将了解不同图像格式的特性以及它们之间的兼容性问题。接着,我们将通过命令行工具实践进行格式转换,以掌握该技术的应用。

3.1.1 不同格式的特点与兼容性

不同的图片格式有其独特的特点和用途。例如,JPEG(联合图片专家小组)是一种有损压缩格式,适用于网络上分享的照片和图像,能够提供相对较小的文件大小和良好的视觉质量。PNG(便携式网络图形)是一种无损压缩格式,支持透明背景,常用于网页设计。GIF(图形交换格式)支持动画,但色彩有限。BMP(位图)是一种无压缩的格式,适合在Windows系统中使用。

了解这些格式的基本特性对于在实际工作中选择合适的转换格式至关重要。在进行格式转换时,需要考虑到图像的用途、文件大小、显示设备以及兼容性等因素。例如,如果需要在网页上展示图片,则JPEG可能是更好的选择;而如果需要透明背景,则PNG会是更合适的选择。

3.1.2 格式转换的命令行实践

现在,我们通过一个命令行实践来转换一批图片的格式。我们将使用流行的命令行工具ImageMagick进行转换,这是一个功能强大的图像处理工具,支持多种操作系统。

首先,确保已经安装了ImageMagick,并配置在系统的环境变量中,这样可以在任何命令行界面中直接调用它。以下是将一系列JPEG文件批量转换为PNG格式的命令示例:

convert *.jpg *.png

这个命令会将当前目录下所有的 .jpg 文件转换为 .png 文件。ImageMagick的 convert 命令非常灵活,可以接受多种参数来进行更高级的图片处理。

3.2 图像质量调整技术细节

在图片处理中,图像质量调整是一个不可忽视的环节。无论是为了优化网站加载速度而减少图片大小,还是为了改善打印质量而增强分辨率,对图片的图像质量进行适当调整都是必要的。本节将讨论如何添加水印以及调整亮度和对比度,提供实用的技术细节和参数解析。

3.2.1 水印添加的技巧与方法

水印是保护数字媒体版权的一种常见手段,通常是一种半透明的标志或文字,叠加在图片上。使用ImageMagick添加水印很简单,下面是一个添加水印的命令示例:

convert input.jpg -font Arial -pointsize 24 -fill white -draw "text 20,40 'Copyright'" output.jpg

这个命令使用了 convert 工具,并指定了输入文件 input.jpg ,然后添加了文本水印(使用Arial字体,字号为24,白色文字),位置位于图片左上角20像素下40像素处。最后输出为 output.jpg

3.2.2 亮度与对比度调节参数解析

亮度和对比度是影响图像质量的两个重要参数。亮度决定了图片的明暗程度,而对比度决定了图片中暗部和亮部的差异程度。使用ImageMagick可以轻松调节这两个参数。下面是一个命令行示例:

convert input.jpg -modulate 120,100,100 output.jpg

在这个命令中, -modulate 参数用于调节亮度和对比度。其中 120 代表亮度增加20%, 100,100 表示对比度保持不变。

亮度和对比度的调节对图片的最终视觉效果影响很大。适当的调整可以使得图片看起来更自然,或者突出特定的视觉效果。在调节时,需要根据图片的具体内容和用途进行调整,以达到最佳效果。

接下来,我们可以开始展示表格、mermaid流程图和代码块来进一步丰富本章节内容。

4. 批量图片的重命名与管理

在数字媒体时代,图片库的管理和重命名是日常工作中不可或缺的一部分,尤其是在需要对大量图片进行分类和整理时。批量图片重命名能够大大提升工作效率,减少人为错误,并确保文件命名的一致性。在本章节中,我们将探讨如何制定有效的重命名策略和规则,并进一步介绍文件管理与组织的技巧。

4.1 重命名策略与规则制定

重命名是将多个文件名更改为符合特定格式的过程。它涉及策略的选择和规则的制定,以确保文件名的唯一性和描述性。

4.1.1 文件命名的最佳实践

文件命名是文件管理的第一步,以下是文件命名的一些最佳实践:

  • 一致性: 确保所有文件名都遵循同一命名规则,这有助于保持文件系统的整洁。
  • 可读性: 使用清晰、明确的文件名,避免过度使用缩写。
  • 描述性: 包含足够的信息来描述文件内容或其用途,便于快速识别。
  • 简短性: 过长的文件名可能会在某些系统上截断,因此要保持简短但信息丰富。
  • 日期格式: 在文件名中包含日期可以方便地按时间排序,例如“YYYYMMDD”格式。
例如:
- 原始图片名:IMG_2345.jpg
- 重命名后:***_LondonBridge_HD.jpg

4.1.2 使用模板和变量的批量重命名方法

在进行批量重命名时,可以利用模板和变量来简化任务。许多批量重命名工具都支持使用占位符来引用文件的元数据或当前文件名的部分信息。

举例:使用shell脚本进行批量重命名
for file in *.jpg; do
    mv -- "$file" "$(date +%Y%m%d)_${file#*_}"
done

该脚本将遍历当前目录下的所有 .jpg 文件,并使用日期和原始文件名的剩余部分作为新的文件名。

4.2 文件管理与组织技巧

文件管理是关于如何组织和存储文件以确保易于访问和检索。良好的文件管理策略可以节省时间,避免重复工作,并提高效率。

4.2.1 文件分类存储的策略

在处理大量图片时,文件分类存储是一个关键的步骤。这可以通过以下方式实现:

  • 项目或主题: 将文件按项目或主题分组,例如“假期照片”、“产品摄影”等。
  • 类型或格式: 将同一类型的文件放在一起,如JPEG、PNG或RAW格式文件。
  • 版本控制: 为编辑过程中的不同版本保存文件,例如加入“_v1”、“_v2”等后缀。
  • 时间线: 按日期或时间顺序组织文件,便于检索历史数据。

4.2.2 管理工具的使用与自动化

为了更高效地管理文件,可以使用各种管理工具来自动化重复任务。一些常用的工具包括:

  • 文件管理器: 如Windows的Explorer或macOS的Finder的高级搜索和文件夹操作。
  • 专业软件: 例如Adobe Bridge或Lightroom用于图像管理。
  • 脚本语言: 如Python或PowerShell脚本进行自动化重命名、移动或删除文件。
# 示例Python脚本自动化文件管理任务
import os

# 定义一个函数来创建目录结构
def create_directory_structure(base_dir):
    os.makedirs(os.path.join(base_dir, "Raw"), exist_ok=True)
    os.makedirs(os.path.join(base_dir, "Edited"), exist_ok=True)
    os.makedirs(os.path.join(base_dir, "Final"), exist_ok=True)

# 调用函数创建目录结构
create_directory_structure("MyPhotoProject")

# 重命名并移动文件到对应的目录
for file_name in os.listdir():
    if file_name.endswith(".jpg"):
        os.rename(file_name, os.path.join("Raw", file_name))

该脚本创建了一个基础目录,并将所有 .jpg 文件移动到“Raw”子目录下,以便于管理。通过进一步扩展,可以将编辑过的图片移动到“Edited”目录,并将最终版本保存在“Final”目录中。

在本章节中,我们深入探讨了批量图片重命名与管理的方法和策略。通过执行详细的文件命名规则,使用模板和变量进行批量重命名,以及采用分类存储和自动化工具来组织文件,可以显著提高图片处理的效率和可管理性。在下一章节中,我们将进一步深入到批量图片处理的实战案例分析。

5. 批量图片处理实战案例分析

实际场景中的应用案例

网站图片批量优化

在当今的数字时代,网站的性能优化至关重要,尤其是在加载速度方面。图片作为网站内容的重要组成部分,其优化对于提高网站性能和用户体验有着直接的影响。以下是针对网站图片批量优化的应用案例分析。

网站图片需求分析

在进行图片批量优化前,首先需要对网站的图片需求进行分析。这包括确定图片的尺寸、分辨率、格式以及压缩级别。例如,一张用于网站主页横幅的图片,可能需要较大的尺寸和较高的分辨率,而用于产品展示的小图,则需要较小的文件尺寸以便快速加载。

批量处理流程与脚本实现

一旦确定了图片需求,接下来可以使用批量处理工具来自动化这一流程。以 resizer.exe 程序为例,我们可以编写一个简单的脚本来自动调整图片尺寸和压缩级别。

# 示例脚本:批量调整图片尺寸并优化压缩

for file in *.jpg; do
    resizer.exe --width 1200 --height auto --quality 85 "$file" "resized_$file"
done

此脚本会遍历当前目录下所有的 .jpg 文件,将它们批量调整为最大宽度1200像素,保持纵横比,并设置压缩质量为85,输出的文件名为原文件名前加上 "resized_" 前缀。

数码照片的批量管理

数码照片的管理是摄影爱好者和专业摄影师面临的常见问题。大量的照片文件如果管理不善,不仅会导致存储空间的浪费,还会影响查找和使用效率。

照片分类和元数据处理

批量管理数码照片的关键在于有效的分类和元数据处理。这可以通过批量重命名和元数据编辑工具来实现。

# 示例脚本:基于日期对照片进行批量重命名

for file in *.jpg; do
    newname=$(exiftool -d "%Y-%m-%d_%H%M%S" -filename "$file" "$file")
    mv "$file" "$newname"
done

上述脚本使用 exiftool 来读取图片的元数据,并根据拍摄时间创建新的文件名,然后将文件重命名为新的文件名。这样可以按照时间顺序自动排序,方便管理和查找。

高效的图片备份策略

对于重要的数码照片,建立一个高效且安全的备份策略是必不可少的。这通常涉及到将照片存储在多个位置,例如本地硬盘、外部硬盘和云存储服务。

商业图像处理的工作流

商业图像处理通常要求高质量和精确的图像输出,以符合广告、宣传和出版的高标准。

商业图像质量标准

商业图像处理的质量标准涉及多个方面,包括分辨率、色彩准确度、细节保留和压缩无损等。在批量处理时,需要确保所有图像均满足这些标准。

高效图像处理工作流构建

构建一个高效的图像处理工作流可以大大提升工作效率。这通常包括自动化的图像导入、处理、调整和导出过程。

graph TD
    A[导入图像] --> B[预设调整]
    B --> C[质量检查]
    C --> |合格| D[最终调整]
    C --> |不合格| E[手动调整]
    D --> F[导出图像]
    E --> F

通过使用脚本和批量处理工具,例如 resizer.exe ,可以简化上述流程,减少重复性工作并提高整体工作效率。

本文还有配套的精品资源,点击获取 menu-r.4af5f7ec.gif

简介:在图像处理中,批量改图工具可以显著提升用户工作效率,特别是对摄影师、设计师等行业人士。本工具能够快速调整图片分辨率与尺寸,并保持图片纵横比,以适应不同需求如打印或屏幕显示。批量改图工具的命名简洁明了,通常以“resizer.exe”为执行程序名,用户可通过它批量设定尺寸,同时可能包含其他高级功能如格式转换、水印添加、亮度对比度调整等,极大地增强了图片处理的灵活性和效率。

本文还有配套的精品资源,点击获取 menu-r.4af5f7ec.gif

Version: ImageMagick 6.7.6-7 2012-04-20 Q16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC Features: OpenMP Usage: convert.exe [options ...] file [ [options ...] file ...] [options ...] file Image Settings: -adjoin join images into a single multi-image file -affine matrix affine transform matrix -alpha option activate, deactivate, reset, or set the alpha channel -antialias remove pixel-aliasing -authenticate password decipher image with this password -attenuate value lessen (or intensify) when adding noise to an image -background color background color -bias value add bias when convolving an image -black-point-compensation use black point compensation -blue-primary point chromaticity blue primary point -bordercolor color border color -caption string assign a caption to an image -channel type apply option to select image channels -colors value preferred number of colors in the image -colorspace type alternate image colorspace -comment string annotate image with comment -compose operator set image composite operator -compress type type of pixel compression when writing the image -define format:option define one or more image format options -delay value display the next image after pausing -density geometry horizontal and vertical density of the image -depth value image depth -direction type render text right-to-left or left-to-right -display server get image or font from this X server -dispose method layer disposal method -dither method apply error diffusion to image -encoding type text encoding type -endian type endianness (MSB or LSB) of the image -family name render text with this font family -fill color color to use when filling a graphic primitive -filter type use this filter when resizing an image -font name render text with this font -format "string" output formatted image characteristics -fuzz distance colors within this distance are considered equal -gravity type horizontal and vertical text placement -green-primary point chromaticity green primary point -intent type type of rendering intent when managing the image color -interlace type type of image interlacing scheme -interline-spacing value set the space between two text lines -interpolate method pixel color interpolation method -interword-spacing value set the space between two words -kerning value set the space between two letters -label string assign a label to an image -limit type value pixel cache resource limit -loop iterations add Netscape loop extension to your GIF animation -mask filename associate a mask with the image -mattecolor color frame color -monitor monitor progress -orient type image orientation -page geometry size and location of an image canvas (setting) -ping efficiently determine image attributes -pointsize value font point size -precision value maximum number of significant digits to print -preview type image preview type -quality value JPEG/MIFF/PNG compression level -quiet suppress all warning messages -red-primary point chromaticity red primary point -regard-warnings pay attention to warning messages -remap filename transform image colors to match this set of colors -respect-parentheses settings remain in effect until parenthesis boundary -sampling-factor geometry horizontal and vertical sampling factor -scene value image scene number -seed value seed a new sequence of pseudo-random numbers -size geometry width and height of image -stretch type render text with this font stretch -stroke color graphic primitive stroke color -strokewidth value graphic primitive stroke width -style type render text with this font style -synchronize synchronize image to storage device -taint declare the image as modified -texture filename name of texture to tile onto the image background -tile-offset geometry tile offset -treedepth value color tree depth -transparent-color color transparent color -undercolor color annotation bounding box color -units type the units of image resolution -verbose print detailed information about the image -view FlashPix viewing transforms -virtual-pixel method virtual pixel access method -weight type render text with this font weight -white-point point chromaticity white point Image Operators: -adaptive-blur geometry adaptively blur pixels; decrease effect near edges -adaptive-resize geometry adaptively resize image using 'mesh' interpolation -adaptive-sharpen geometry adaptively sharpen pixels; increase effect near edges -alpha option on, activate, off, deactivate, set, opaque, copy transparent, extract, background, or shape -annotate geometry text annotate the image with text -auto-gamma automagically adjust gamma level of image -auto-level automagically adjust color levels of image -auto-orient automagically orient (rotate) image -bench iterations measure performance -black-threshold value force all pixels below the threshold into black -blue-shift factor simulate a scene at nighttime in the moonlight -blur geometry reduce image noise and reduce detail levels -border geometry surround image with a border of color -bordercolor color border color -brightness-contrast geometry improve brightness / contrast of the image -cdl filename color correct with a color decision list -charcoal radius simulate a charcoal drawing -chop geometry remove pixels from the image interior -clamp restrict pixel range from 0 to the quantum depth -clip clip along the first path from the 8BIM profile -clip-mask filename associate a clip mask with the image -clip-path id clip along a named path from the 8BIM profile -colorize value colorize the image with the fill color -color-matrix matrix apply color correction to the image -contrast enhance or reduce the image contrast -contrast-stretch geometry improve contrast by `stretching' the intensity range -convolve coefficients apply a convolution kernel to the image -cycle amount cycle the image colormap -decipher filename convert cipher pixels to plain pixels -deskew threshold straighten an image -despeckle reduce the speckles within an image -distort method args distort images according to given method ad args -draw string annotate the image with a graphic primitive -edge radius apply a filter to detect edges in the image -encipher filename convert plain pixels to cipher pixels -emboss radius emboss an image -enhance apply a digital filter to enhance a noisy image -equalize perform histogram equalization to an image -evaluate operator value evaluate an arithmetic, relational, or logical expression -extent geometry set the image size -extract geometry extract area from image -fft implements the discrete Fourier transform (DFT) -flip flip image vertically -floodfill geometry color floodfill the image with color -flop flop image horizontally -frame geometry surround image with an ornamental border -function name parameters apply function over image values -gamma value level of gamma correction -gaussian-blur geometry reduce image noise and reduce detail levels -geometry geometry preferred size or location of the image -identify identify the format and characteristics of the image -ift implements the inverse discrete Fourier transform (DFT) -implode amount implode image pixels about the center -lat geometry local adaptive thresholding -layers method optimize, merge, or compare image layers -level value adjust the level of image contrast -level-colors color,color level image with the given colors -linear-stretch geometry improve contrast by `stretching with saturation' -liquid-rescale geometry rescale image with seam-carving -median geometry apply a median filter to the image -mode geometry make each pixel the 'predominant color' of the neighborhood -modulate value vary the brightness, saturation, and hue -monochrome transform image to black and white -morphology method kernel apply a morphology method to the image -motion-blur geometry simulate motion blur -negate replace every pixel with its complementary color -noise geometry add or reduce noise in an image -normalize transform image to span the full range of colors -opaque color change this color to the fill color -ordered-dither NxN add a noise pattern to the image with specific amplitudes -paint radius simulate an oil painting -polaroid angle simulate a Polaroid picture -posterize levels reduce the image to a limited number of color levels -profile filename add, delete, or apply an image profile -quantize colorspace reduce colors in this colorspace -radial-blur angle radial blur the image -raise value lighten/darken image edges to create a 3-D effect -random-threshold low,high random threshold the image -region geometry apply options to a portion of the image -render render vector graphics -repage geometry size and location of an image canvas -resample geometry change the resolution of an image -resize geometry resize the image -roll geometry roll an image vertically or horizontally -rotate degrees apply Paeth rotation to the image -sample geometry scale image with pixel sampling -scale geometry scale the image -segment values segment an image -selective-blur geometry selectively blur pixels within a contrast threshold -sepia-tone threshold simulate a sepia-toned photo -set property value set an image property -shade degrees shade the image using a distant light source -shadow geometry simulate an image shadow -sharpen geometry sharpen the image -shave geometry shave pixels from the image edges -shear geometry slide one edge of the image along the X or Y axis -sigmoidal-contrast geometry increase the contrast without saturating highlights or shadows -sketch geometry simulate a pencil sketch -solarize threshold negate all pixels above the threshold level -sparse-color method args fill in a image based on a few color points -splice geometry splice the background color into the image -spread radius displace image pixels by a random amount -statistic type geometry replace each pixel with corresponding statistic from the neighborhood -strip strip image of all profiles and comments -swirl degrees swirl image pixels about the center -threshold value threshold the image -thumbnail geometry create a thumbnail of the image -tile filename tile image when filling a graphic primitive -tint value tint the image with the fill color -transform affine transform image -transparent color make this color transparent within the image -transpose flip image vertically and rotate 90 degrees -transverse flop image horizontally and rotate 270 degrees -trim trim image edges -type type image type -unique-colors discard all but one of any pixel color -unsharp geometry sharpen the image -vignette geometry soften the edges of the image in vignette style -wave geometry alter an image along a sine wave -white-threshold value force all pixels above the threshold into white Image Sequence Operators: -append append an image sequence -clut apply a color lookup table to the image -coalesce merge a sequence of images -combine combine a sequence of images -composite composite image -crop geometry cut out a rectangular region of the image -deconstruct break down an image sequence into constituent parts -evaluate-sequence operator evaluate an arithmetic, relational, or logical expression -flatten flatten a sequence of images -fx expression apply mathematical expression to an image channel(s) -hald-clut apply a Hald color lookup table to the image -morph value morph an image sequence -mosaic create a mosaic from an image sequence -print string interpret string and print to console -process arguments process the image with a custom image filter -separate separate an image channel into a grayscale image -smush geometry smush an image sequence together -write filename write images to this file Image Stack Operators: -clone indexes clone an image -delete indexes delete the image from the image sequence -duplicate count,indexes duplicate an image one or more times -insert index insert last image into the image sequence -reverse reverse image sequence -swap indexes swap two images in the image sequence Miscellaneous Options: -debug events display copious debugging information -help print program options -list type print a list of supported option arguments -log format format of debugging information -version print version information By default, the image format of `file' is determined by its magic number. To specify a particular image format, precede the filename with an image format name and a colon (i.e. ps:image) or specify the image type as the filename suffix (i.e. image.ps). Specify 'file' as '-' for standard input or output.
06-18
概要<br>对于具有窗口, 只能是某些规模有时非常有用。 例如, MicrosoftWord 和 Microsoft Visual C++® 有工具栏是大小可调整到最适合控件工具栏中特定大小。 这样做, 最好授予用户可视提示有关可用窗口大小。 通过示例 RESIZE 示例代码显示如何修改 Windows 窗口以便当用户使用鼠标来调整窗口边框跳转到下一个可用大小自动调整方式。 <br>更多信息<br>可用于从 Microsoft 下载中心下载下列文件:<br><br>Resize.exe (http://download.microsoft.com/download/platformsdk/sample52/1/w9xnt4/en-us/resize.exe)<br>有关如何下载 Microsoft 支持文件请单击下列文章编号以查看 Microsoft 知识库中相应: <br>119591 (http://support.microsoft.com/kb/119591/EN-US/) 如何从联机服务获取 Microsoft 支持文件 <br>此文件进行病毒扫描 Microsoft。 Microsoft 使用最新病毒检测软件, 投递文件日期上的可用。 文件存储, 有助于防止对文件进行任何未经授权更改安全性增强的服务器上。 当用户单击的窗口, 调整边框 Windows 进入 PeekMessage 循环以捕获所有鼠标消息发生直到已释放鼠标左键。 而在此循环, 每当鼠标移动移动矩形, 显示新窗口大小以向用户与新窗口大小将是什么提供可视提示。 <br><br>通过进入消息循环以捕获鼠标消息直到是左按钮释放其自己 RESIZE 示例代码修改调整操作。 不用每次接收鼠标移动, 更新矩形 RESIZE 代码检查以查看如果当前鼠标位置会使窗口大小之一可能窗口宽度和高度大小由应用程序所定义。 由此, RESIZE 应用程序提供更准确的可视提示有关调整操作将采取哪些。 <br><br>通过同时用于 Windows 和 RESIZE 应用 WM_NCLBUTTONDOWN 邮件触发调整操作。 当收到此消息, 消息循环输入来过滤掉除对两, WM _ MOUSEMOVE 和 WM _ LBUTTONUP 所有鼠标消息。 RESIZE 应用程序接收到 WM _ MOUSEMOVE 消息, 时检查以查看放大或缩小如果当前鼠标位置将使窗口。 如果窗口是小, 调整矩形移到下一个小维度由应用程序定义。 如果窗口是大, 程序将检查以是否会对下可能维度足够新大小以及相应更新矩形。 接收到 WM _ LBUTTONUP 消息, 时通过窗口大小更新到当前位置由鼠标完成调整操作并删除矩形。 <br><br>RESIZE 应用程序还利用了一部分由处理 WM_NCHITTEST 消息提供了灵活性。 Windows 向应用程序与鼠标位置发送此消息并期望应用程序能够描述的窗口, 包括鼠标位置部分。 经常, 应用程序传递到 DefWindowProc() 此消息并让默认计算是什么鼠标是顶部告诉系统负责。 RESIZE 应用允许 DefWindowProc() 来处理消息, 但然后检查以确定是否将鼠标置于某个在工作区或调整转角。 为了简化调整操作, RESIZE 不让调整从窗口角, 以便 HTTOPRIGHT 点击测试代码并返回 HTBOTTOM 或 HTTOP 替代 HTBOTTOMLEFT HTTOPLEFT, HTBOTTOMRIGHT, 应用程序和用户。 由此, 鼠标光标准确反映调整的方向。 当 HTCLIENT 命中返回测试代码, RESIZE 变为这 HTCAPTION 以便窗口以移动即使它没有标题栏。 <br><br>尽管此方法将使用 Windows 95, 就没有必要。 Windows 95 提供新消息 WM_SIZING, 将启用程序不处理 WM_NCxxx 消息或进入 PeekMessage() 循环进行完全相同。 <br>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值