古豆 发表于 2010-12-22 10:14:27

炒冷饭啦!一键制作Grub背景XPM并压缩成gz文件的方法工具!(2011.1.14更新)

GRUB背景图片的制作
方法一:
1、把图片调整为640×480,颜色数为14色,另存为BMP;(i_view32)
2、转换为XPM格式图片;(XnView打开后直接另存为)
3、把XPM压缩成GZ格式;(Gzip)
方法二:
1、用XnView(1.74及以上版本)打开图片,调整大小640×480,转为16色索引颜色,编辑颜色表,修改两组相近颜色,让颜色数为14,另存为XPM文件;
2、用Gzip压缩XPM文件为GZ文件;
方法三:
1、Photoshop打开图像,调整大小640×480,图像→模式→索引:“强制”为无,“透明度”取消,颜色多的图像可修改颜色数为14;检测:模式转回RGB,再转成索引时看到颜色数。
2、保存为BMP后,用XnView+ 1.74版转换为XPM文件。
3、用Gzip压缩成.gz压缩包。
方法四:(已做成批处理,EZ!)
1、用convert.exe直接把JPG文件转换成640×480的XPM文件,参数convert <JPG文件名> -colors 14 -geometry 640x480 <XPM文件名>
2、压缩成GZ格式。
附加说明:
1、XnView+、IrfanView可方便看XPM图像及它的属性,显示为索引8位(256色)是正常的。
2、Gzip是命令行工具,用法:gzip -9 XXXX.xpm


用到的工具如下:(推荐用方法四制作,极傻瓜,只需把JPG文件放入同一文件夹,运行 转换压缩.cmd 即可得到gz文件。









2010.12.22更新:一键制作800×600的XPM。



2011.1.14更新:针对是不4:3比例的图像也能制作出640×480/800×600的XPM
640×480/800×600都包含了:

[ 本帖最后由 古豆 于 2011-1-14 17:55 编辑 ]

古豆 发表于 2010-12-22 10:18:58

方法四已经制作成批处理,解压后把喜欢的JPG文件放同一文件夹,运行“转换压缩.cmd”就OK!

直接得到.gz文件,查看的话先解压再用IrfanView或XnView打开。

古豆 发表于 2010-12-22 10:23:52

收集+制作的一些Grub背景























[ 本帖最后由 古豆 于 2010-12-22 10:31 编辑 ]

sratlf 发表于 2010-12-22 10:52:13

支持一下分辨率最好再加一个800×600新版grub已经可以支持800×600分辨率的xpm了

cnhfg 发表于 2010-12-22 11:13:37

学习下~~~~~~~~~~~~~~~~~~~~~

2010dxysp3 发表于 2010-12-22 11:54:10

这样做出来的图片有点失真吧....gfxmenu要好看些

viptks 发表于 2010-12-22 12:57:43

原帖由 sratlf 于 2010-12-22 10:52 发表 http://bbs.wuyou.net/images/common/back.gif
支持一下分辨率最好再加一个800×600新版grub已经可以支持800×600分辨率的xpm了
menu要怎么写呢?麻烦给个全的,3Q

sratlf 发表于 2010-12-22 13:18:58

回复 #7 viptks 的帖子

http://bbs.wuyou.net/forum.php?mod=viewthread&tid=180028

地方电力 发表于 2010-12-26 00:53:25

看过了!收获比较大的!

ttt0001 发表于 2010-12-26 06:38:41

方法四确实很方便!谢谢楼主,收藏了!

2010waitopen 发表于 2010-12-26 12:12:28

感谢分享~.....

gopc 发表于 2010-12-29 18:11:03

還真是方便的小工具。
感謝

小施 发表于 2010-12-29 19:05:04

做的很不错支持了

2010jywqd 发表于 2011-1-1 16:26:16

留个名,参考下
字数补丁

tangzuolin2 发表于 2011-1-1 20:30:54

谢谢分享 都是好东西

jsgh1983 发表于 2011-1-2 23:05:21

我也是刚刚开始研究GRUB4DOS,谢谢你给的指导!

今天需要用到,所以到处找,没有更好的办法。谢谢你的方发了。

2010waitopen 发表于 2011-1-9 20:55:13

按照方法四座,XPM文件大小640*480的转换后显示的是640*400,800*600的做成的XPM为800*600,是否正常?

古豆 发表于 2011-1-11 17:47:25

原帖由 2010waitopen 于 2011-1-9 20:55 发表 http://bbs.wuyou.net/images/common/back.gif
按照方法四座,XPM文件大小640*480的转换后显示的是640*400,800*600的做成的XPM为800*600,是否正常?


因为那个convert.exe的参数众多,我英文超烂,无法找到强制按设置比例拉伸图像的参数,所以请先用ACDSEE、PS等把不是4:3的图调整大小,最好直接做成800×600的JPG再转换

上述结果有点迷惑,看640×400好像是原图比例不是4:3,后来的800×600……怎么来的呢?呵呵

古豆 发表于 2011-1-11 17:48:15

convert.exe的参数如下,有英文好的找找哪个是强制分辨率大小的……
Version: ImageMagick 6.2.7 05/11/06 Q8 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC

Usage: convert.exe file [ file ...] file

Where options include:
-adaptive-sharpen geometry
                     adaptively sharpen pixels; increase effect near edges
-adjoin            join images into a single multi-image file
-affine matrix       affine transform matrix
-annotate geometry text
                     annotate the image with text
-antialias         remove pixel-aliasing
-append            append an image sequence
-authenticate valuedecrypt image with this password
-average             average an image sequence
-background color    background color
-bias value          add bias when convolving an image
-black-point-compensation
                     use black point compensation
-black-threshold value
                     force all pixels below the threshold into black
-blue-primary pointchromaticity blue primary point
-blur geometry       blur the image
-border geometry   surround image with a border of color
-bordercolor color   border color
-channel type      apply option to select image channels
-charcoal radius   simulate a charcoal drawing
-chop geometry       remove pixels from the image interior
-clip                clip along the first path from the 8BIM profile
-clip-path id      clip along a named path from the 8BIM profile
-clone index         clone an image
-coalesce            merge a sequence of images
-colorize value      colorize the image with the fill color
-colors value      preferred number of colors in the image
-colorspace type   alternate image colorspace
-combine             combine a sequence of images
-comment string      annotate image with comment
-compose operator    set image composite operator
-composite         composite image
-compress type       type of pixel compression when writing the image
-contrast            enhance or reduce the image contrast
-contrast-stretch geometry
                     improve contrast by `stretching' the range of intensity values
-convolve coefficients
                     apply a convolution kernel to the image
-crop geometry       cut out a rectangular region of the image
-cycle amount      cycle the image colormap
-debug events      display copious debugging information
-define format:option
                     define one or more image format options
-deconstruct         break down an image sequence into constituent parts
-delay value         display the next image after pausing
-delete index      delete the image from the image sequence
-density geometry    horizontal and vertical density of the image
-depth value         image depth
-despeckle         reduce the speckles within an image
-display server      get image or font from this X server
-dispose method      GIF disposal method
-dither            apply Floyd/Steinberg error diffusion to image
-draw string         annotate the image with a graphic primitive
-edge radius         apply a filter to detect edges in the image
-emboss radius       emboss an image
-encoding type       text encoding type
-endian type         endianness (MSB or LSB) of the 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
-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
-flatten             flatten a sequence of images
-flip                flip image in the vertical direction
-floodfill geometry color
                     floodfill the image with color
-flop                flop image in the horizontal direction
-font name         render text with this font
-format "string"   output formatted image characteristics
-frame geometry      surround image with an ornamental border
-fuzz distance       colors within this distance are considered equal
-fx expression       apply mathematical expression to an image channel(s)
-gamma value         level of gamma correction
-gaussian geometry   gaussian blur an image
-geometry geometry   perferred size or location of the image
-green-primary point chromaticity green primary point
-gravity type      horizontal and vertical text placement
-help                print program options
-identify            identify the format and characteristics of the image
-implode amount      implode image pixels about the center
-insert index      insert last image into the image sequence
-intent type         type of rendering intent when managing the image color
-interlace type      type of image interlacing scheme
-label name          assign a label to an image
-lat geometry      local adaptive thresholding
-layers method       optimize or compare image layers
-level value         adjust the level of image contrast
-limit type value    pixel cache resource limit
-log format          format of debugging information
-loop iterations   add Netscape loop extension to your GIF animation
-map filename      transform image colors to match this set of colors
-mask filename       set the image clip mask
-matte               store matte channel if the image has one
-mattecolor color    frame color
-median radius       apply a median filter to the image
-modulate value      vary the brightness, saturation, and hue
-monitor             monitor progress
-monochrome          transform image to black and white
-morph value         morph an image sequence
-mosaic            create a mosaic from an image sequence
-motion-blur geometry
                     simulate motion blur
-negate            replace every pixel with its complementary color
-noise radius      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
                     ordered dither the image
-orient type         image orientation
-page geometry       size and location of an image canvas (setting)
-paint radius      simulate an oil painting
-ping                efficiently determine image attributes
-pointsize value   font point size
-posterize levels    reduce the image to a limited number of color levels
-preview type      image preview type
-print string      interpret string and print to console
-process arguments   process the image with a custom image filter
-profile filename    add, delete, or apply an image profile
-quality value       JPEG/MIFF/PNG compression level
-quiet               suppress all error or warning messages
-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
-red-primary point   chromaticity red primary point
-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
-sampling-factor geometry
                     horizontal and vertical sampling factor
-scale geometry      scale the image
-scene value         image scene number
-seed value          pseudo-random number generator seed value
-segment values      segment an image
-separate            separate an image channel into a grayscale image
-sepia-tone threshold
                     simulate a sepia-toned photo
-set attribute value set an image attribute
-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
-sigmodial-contrast geometry
                     lightness rescaling using sigmoidal contrast enhancement
-size geometry       width and height of image
-solarize thresholdnegate all pixels above the threshold level
-splice geometry   splice the background color into the image
-spread amount       displace image pixels by a random amount
-strip               strip image of all profiles and comments
-stroke color      graphic primitive stroke color
-strokewidth value   graphic primitive stroke width
-stretch type      render text with this font stretch
-style type          render text with this font style
-support factor      resize support: > 1.0 is blurry, < 1.0 is sharp
-swap indexes      swap two images in the image sequence
-swirl degrees       swirl image pixels about the center
-texture filename    name of texture to tile onto the image background
-threshold value   threshold the image
-thumbnail geometrycreate 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
-treedepth value   color tree depth
-trim                trim image edges
-type type         image type
-undercolor color    annotation bounding box color
-units type          the units of image resolution
-unsharp geometry    sharpen the image
-verbose             print detailed information about the image
-version             print version information
-view                FlashPix viewing transforms
-vignette geometry   soften the edges of the image in vignette style
-virtual-pixel method
                     virtual pixel access method
-wave geometry       alter an image along a sine wave
-weight type         render text with this font weight
-white-point point   chromaticity white point
-white-threshold value
                     force all pixels above the threshold into white
-write filename      write images to this file

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.

moondust 发表于 2011-1-14 11:23:05

与其支持800X600图片倒不如支持32色图,要知道,32色与16色相差很远啦。

2010ziymin 发表于 2011-1-16 21:14:43

太好了,支持啊!!!!

2010ziymin 发表于 2011-1-16 21:20:03

刚好想到要制作,一看论坛,上面就有楼主发的神帖!!!再顶一个!!!

cqflfzlyx 发表于 2011-2-10 11:12:09

这个一定要学学,留个脚印

2011bomboy 发表于 2011-4-2 14:21:07

谢谢分享,好东西啊

joe_boy 发表于 2011-4-17 11:40:10

谢谢楼主分享怎么用XNVIEW修改XPM文件楼主做好的XPM怎么制作呢谢谢QQ357916336

[ 本帖最后由 joe_boy 于 2011-4-17 11:41 编辑 ]

qj_tzy 发表于 2011-4-19 14:30:05

回复 #1 古豆 的帖子

下载后,已试用,觉得方法好,谢谢!

2011xdsy 发表于 2011-4-20 21:56:36

有几张图片很眼熟啊。

saintlulu 发表于 2011-12-2 12:51:00

楼主的帖子太好啦,解决了俺的N多问题!多谢分享!

于山 发表于 2011-12-2 22:52:29

不错!..................................

2010link001 发表于 2011-12-28 14:33:42

失真的很厉害啊!还是黑色背景的算了
页: [1] 2
查看完整版本: 炒冷饭啦!一键制作Grub背景XPM并压缩成gz文件的方法工具!(2011.1.14更新)