gimp修复像素低模糊照片
Adobe’s Photoshop is the de facto image editing software for most web designers. But if you’re just starting out and lack the funds to spend on it, it’s good to know there are alternatives considerably lighter on the wallet. One prime example is GIMP (the Gnu Image Manipulation Program), which is a free and open-source, pixel-based image editor. Although it’s missing some of Photoshop’s nicer time-saving features and advanced options, and its interface can be a little quirky, it can be a great option for quickly sketching out designs. The price is certainly unbeatable.
Adobe的Photoshop是大多数Web设计师事实上的图像编辑软件。 但是,如果您只是刚起步而又没有足够的资金花在上面,那么很高兴知道钱包中有其他替代品也要轻得多。 一个典型的例子是GIMP(对于g NU 我法师中号 anipulation 页程序),这是一个自由和开源,基于像素的图像编辑器。 尽管它缺少一些Photoshop更好的省时功能和高级选项,并且它的界面可能有点古怪,但是对于快速草绘设计而言,它可能是一个不错的选择。 价格肯定是无与伦比的。
To introduce you to some of GIMP’s features, I’ll walk you through the creation of a space-themed desktop background image. By the time we’re done you’ll have a good understanding of:
为了向您介绍GIMP的某些功能,我将引导您完成以空间为主题的桌面背景图像的创建。 到我们完成时,您将对以下内容有充分的了解:
selection management
选择管理
layer management
层管理
layer masks
图层蒙版
gradients
渐变
brushes
刷子
layer blending modes
图层混合模式
filters
过滤器
Here’s what the final image will look like:
最终图像如下所示:
Figure 1. The final background image
图1.最终的背景图片
This might look like it would take a lot of work, but you’ll be surprised at how easy it is to accomplish with a little knowledge of GIMP’s filters and layer features.
这看起来可能需要很多工作,但是您会惊讶于对GIMP过滤器和图层功能的一点了解就容易完成。
If you’ve yet to install GIMP on your system, you can download it from http://www.gimp.org/downloads/. For this tutorial I’ll be using version 2.6.7 of GIMP, which is the most recent version at the time of writing. If you’re using an older version some of the features we’ll be playing with might be different or missing.
如果尚未在系统上安装GIMP,则可以从http://www.gimp.org/downloads/下载。 在本教程中,我将使用GIMP的2.6.7版本,这是撰写本文时的最新版本。 如果您使用的是旧版本,我们将要使用的某些功能可能会有所不同或缺失。
One of the first aspects you’ll notice when you start GIMP is that the various “docks” (such as Layers, Toolbox, and so forth) are split over multiple windows. This can be disorientating at first, but you’ll grow used to it. Should you accidentally close one of the windows, you can go to Windows>Recently Closed Docks to reopen it.
启动GIMP时,您会注意到的第一个方面是,各种“码头”(例如Layers , Toolbox等)被划分为多个窗口。 刚开始时这可能会让人迷失方向,但是您会逐渐习惯它。 如果您不小心关闭了其中一个窗口,则可以转至Windows > 最近关闭的坞站以重新打开它。
We’ll be creating our space image in three steps. First, we’ll make a field of stars for the background. Then we’ll add some colorful nebulae; and finally we’ll add a big planet to sit in the center, with a starburst effect poking out from behind it.
我们将分三步创建空间图像。 首先,我们将为背景设置一个星域。 然后,我们将添加一些彩色的星云; 最后,我们将在中心增加一个大行星,并从其后面突显出星爆效果。
note: Note for Mac users 注意: Mac用户注意GIMP on Mac runs inside the X windowing environment. This means that, contrary to your usual practice, you’ll be using Ctrl rather than Command for keyboard shortcuts—just like everyone else.
Mac上的GIMP在X窗口环境中运行。 这意味着与通常的做法相反,您将使用Ctrl而不是Command来实现键盘快捷键-就像其他所有人一样。
The first element we want is a field of stars on a black background. We’ll begin by opening a new document (Ctrl+N or File>New). Make it large enough to cover your desktop. I’m making my image 1024 by 768 pixels, but feel free to make yours larger, as you can always scale it down later.
我们要的第一个元素是黑色背景上的星域。 我们将从打开一个新文档( Ctrl + N或File > New )开始。 使它足够大以覆盖您的桌面。 我将图片的尺寸设为1024 x 768像素,但请随时放大,因为以后可以随时缩小图片。
To fill the background layer with black, first select the Bucket Fill tool from the Toolbox window (or press Shift+B). Then click the top (foreground) color swatch (just below all the tool icons), and choose pure black. Click anywhere on your new image and it will fill with black.
要用黑色填充背景层,请首先从“ 工具箱”窗口中选择“桶填充”工具(或按Shift + B )。 然后单击顶部(前景)色样(在所有工具图标的正下方),然后选择纯黑色。 单击新图像上的任意位置,它将以黑色填充。
To create the stars we’ll use the Hurl filter. Select Filters>Noise>Hurl from the menu. In the dialog box, lower the Randomization to 1%, and click New Seed to generate a new random star field. Click OK, and the black background should now be dotted with stars.
为了创建星星,我们将使用“ url”过滤器。 从菜单中选择“ 过滤器” >“ 噪声” >“ 卷曲 ”。 在对话框中,将“ 随机化”降低到1%,然后单击“ 新建种子”以生成一个新的随机星场。 单击“ 确定” ,黑色背景现在应点缀星号。
Figure 2. Creating the star field
图2.创建星域
There are a few problems though. First, the stars created are too colorful, so we’ll remove the colors using Colors>Desaturate. We also want a star field that’s a little less dense, so we’ll thin it out by opening the levels dialog—Colors>Levels—and dragging the black arrow on the left of the upper bar towards the right side. You’ll see most of the stars disappear.
虽然有一些问题。 首先,所创建的星星太过鲜艳,因此我们将使用“ 颜色” >“ 去饱和度”来删除颜色。 我们还需要一个密度稍小的星场,因此我们可以通过打开“色阶”对话框(“ 颜色” >“ 色阶 ”)并将上条左侧的黑色箭头拖向右侧来使其变稀。 您会看到大多数星星消失了。
Next we want to add some nebulae. Create a new layer (Shift+Ctrl+N), call it “Nebulae,” and set the background color to transparent (this will be remembered for future layers). Select Filter>Render>Clouds>Solid Noise from the menu. In the dialog, check the Turbulent box. Play around with different X-Size, Y-Size, and Detail settings to create the type of nebulae you want, and click OK. (If you apply a filter that you decide you don’t want, you can always undo it with Ctrl+Z.)
接下来,我们要添加一些星云。 创建一个新层( Shift + Ctrl + N ),将其命名为“ Nebulae”,并将背景色设置为透明(以后的层会记住该颜色)。 从菜单中选择“ 滤镜” >“ 渲染” >“ 云” >“ 纯噪声 ”。 在对话框中,选中湍流框。 使用不同的X大小 , Y大小和“ 细节”设置来创建所需的星云类型,然后单击“ 确定” 。 (如果您应用不需要的过滤器,则始终可以使用Ctrl + Z撤消它。)
Figure 3. Adding the nebulae
图3.添加星云
The Solid Noise filter has covered the whole image with clouds, which is undesirable for our purposes. To filter out the lighter areas, use the Levels dialog again, this time dragging the left hand arrow on the top bar about a quarter of the way to the right.
固体噪声滤镜将整个图像都覆盖了云,这对于我们的目的而言是不可取的。 要滤除较亮的区域,请再次使用“ 色阶”对话框,这一次将顶栏上的左箭头拖动到右侧的四分之一左右。
We now have some nice clouds, but you might notice that the stars have disappeared. This is because the new Nebulae layer has completely covered the background layer. We need to make some parts of the new layer transparent, and we can do this with a Layer Mask. In the Layers dialog (if it’s hidden you can bring it forward with Ctrl+L), right-click on the layer you’ve created for the nebulae and select Add Layer Mask. Select Grayscale copy of layer and click Add.
现在我们有了一些漂亮的云,但是您可能会注意到星星已经消失了。 这是因为新的星云层已完全覆盖了背景层。 我们需要使新图层的某些部分透明,我们可以使用图层蒙版来做到这一点。 在“ 层”对话框中(如果它是隐藏的,则可以使用Ctrl + L使其向前移动),右键单击为星云创建的层,然后选择“ 添加层蒙版” 。 选择图层的灰度副本,然后单击添加 。
Figure 4. Adding a layer mask
图4.添加一个图层蒙版
We’ve created a layer mask, making the selected layer semi-transparent. Layer masks are actually very simple: they’re just black-and-white maps that indicate which parts of the associated layer are visible. White areas are transparent, black areas opaque, and gray areas increasingly translucent as they approach white. Right now you’re unable to see the mask; in order to show it you need to right-click the layer and check Show Layer Mask (and Edit Layer Mask if it’s unchecked). Now you can work with the layer mask just as you would a normal layer—adding gradients, drawing with brushes, and adjusting with levels or curves.
我们创建了一个图层蒙版,使选定的图层半透明。 图层蒙版实际上非常简单:它们只是表示相关图层的哪些部分可见的黑白地图。 白色区域是透明的,黑色区域是不透明的,而灰色区域在接近白色时逐渐变得半透明。 现在,您看不到面具。 为了显示它,您需要右键单击该图层并选中“ 显示图层蒙版” (如果未选中,则编辑“图层蒙版” )。 现在,您可以像使用普通图层一样使用图层蒙版了-添加渐变,使用画笔绘制以及使用级别或曲线进行调整。
It will be unnecessary to do any of this for our image, however. Uncheck Show Layer Mask, and have a look: since we made our layer mask by copying the original Nebulae layer, the only parts of it that are transparent are areas where there are nebulae. So the stars are perfectly visible in the other parts of the image.
但是,对于我们的图像,无需执行任何操作。 取消选中“ 显示图层蒙版” ,然后看一下:由于我们是通过复制原始星云图层来制作图层蒙版的,因此它唯一透明的部分是存在星云的区域。 因此,星星在图像的其他部分完全可见。
Plain white nebulae are a bit dull though—we need to add some color. Create a new layer and call it “Color.” Then select the Paintbrush Tool (P), choose the largest “Fuzzy” brush—Circle Fuzzy (19)—and drag the Scale slider to 10.0 (giving you a brush size of 190 pixels). Open the Brush Dynamics submenu in the Toolbox and make sure only the bottom-right (Random Color) check is active. This will produce a random variation between the foreground and background colors as you paint. Choose two complementary colors (for example, red and blue) for the foreground and background, by clicking on the two color swatches in the Toolbox and selecting the colors you want.
普通的白色星云有些暗淡-我们需要添加一些颜色。 创建一个新层,并将其命名为“ Color”。 然后选择“画笔工具”( P ),选择最大的“模糊”画笔- 圆形模糊(19) -并将“ 缩放”滑块拖动到10.0(为您提供190像素的画笔大小)。 打开“ 工具箱”中的“ 画笔动力学”子菜单,并确保仅激活右下角的(“ 随机颜色” )检查。 绘制时,这将在前景色和背景色之间产生随机变化。 通过在工具箱中单击两个色样并选择所需的颜色,为前景和背景选择两种互补色(例如,红色和蓝色)。
Now begin dabbing color over the nebulae. Nevermind if the splodges completely cover them, we’ll fix that in a moment. You can choose more color pairs if you want each nebula to be a different color.
现在开始在星云上涂抹颜色。 没关系,如果碎片完全覆盖了它们,我们会在稍后解决。 如果希望每个星云都是不同的颜色,则可以选择更多的颜色对。
Figure 5. Adding color to the nebulae
图5.向星云添加颜色
When you’re done, simply change the layer’s mode to Color in the Layers dialog and you’ll see the splodges disappear, with only their color remaining. As is, the Color layer will color any layer that’s beneath it. To make it so that the color only applies to the nebulae, we’ll merge the layers: make sure the Color layer is immediately above the Nebulae layer in the Layers dialog (you can reorder the layers by dragging them), then right-click on the color layer and select Merge Down. This will merge the layers into one, combining their contents.
完成后,只需在“ 层”对话框中将层的模式更改为“ 颜色 ”,您会看到这些碎片消失了,仅保留了它们的颜色。 照原样,“颜色”层将为其下的任何层着色。 为了使颜色仅适用于星云,我们将合并图层:确保“颜色”层位于“ 层”对话框中的星云层正上方(您可以通过拖动来重新排列层),然后右键单击在颜色图层上,选择向下合并 。 这将合并各层,合并其内容。
Now our nebulae are colorful, but they still look a little flat. To make them more detailed and three-dimensional, we can make some parts of them brighter than others. To do this, duplicate the newly merged layer (right-click on the layer and select Duplicate) and apply the Softglow filter (Filters>Artistic>Softglow) with the default settings to the new layer. Then, using the Eraser (shift+e) tool with a large fuzzy brush, remove areas of the glow layer. This can be tricky; remember that you can always undo your actions with Ctrl+Z if you want to try again.
现在我们的星云是彩色的,但它们看上去仍然有些平坦。 为了使它们更详细和更立体,我们可以使它们的某些部分比其他部分更亮。 为此,请复制新合并的图层(右键单击该图层并选择Duplicate ),然后将具有默认设置的Softglow滤镜(“ 滤镜” >“ Artistic” >“ Softglow” )应用于新图层。 然后,使用带有大模糊笔刷的橡皮擦 ( shift + e )工具删除发光层的区域。 这可能很棘手。 请记住,如果要重试,可以始终使用Ctrl + Z撤消操作。
翻译自: https://www.sitepoint.com/pushing-pixels-shoestring-gimp/
gimp修复像素低模糊照片