⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 usage.doc

📁 这是在PCA下的基于IPP库示例代码例子,在网上下了IPP的库之后,设置相关参数就可以编译该代码.
💻 DOC
📖 第 1 页 / 共 2 页
字号:
USAGE instructions for the Independent JPEG Group's JPEG software=================================================================This file describes usage of the JPEG conversion programs cjpeg and djpeg,as well as the utility programs jpegtran, rdjpgcom and wrjpgcom.  (Seethe other documentation files if you wish to use the JPEG library withinyour own programs.)If you are on a Unix machine you may prefer to read the Unix-style manualpages in files cjpeg.1, djpeg.1, jpegtran.1, rdjpgcom.1, wrjpgcom.1.INTRODUCTIONThese programs implement JPEG image compression and decompression.  JPEG(pronounced "jay-peg") is a standardized compression method for full-colorand gray-scale images.  JPEG is designed to handle "real-world" scenes,for example scanned photographs.  Cartoons, line drawings, and othernon-realistic images are not JPEG's strong suit; on that sort of materialyou may get poor image quality and/or little compression.JPEG is lossy, meaning that the output image is not necessarily identical tothe input image.  Hence you should not use JPEG if you have to have identicaloutput bits.  However, on typical real-world images, very good compressionlevels can be obtained with no visible change, and amazingly high compressionis possible if you can tolerate a low-quality image.  You can trade off imagequality against file size by adjusting the compressor's "quality" setting.GENERAL USAGEWe provide two programs, cjpeg to compress an image file into JPEG format,and djpeg to decompress a JPEG file back into a conventional image format.On Unix-like systems, you say:	cjpeg [switches] [imagefile] >jpegfileor	djpeg [switches] [jpegfile]  >imagefileThe programs read the specified input file, or standard input if none isnamed.  They always write to standard output (with trace/error messages tostandard error).  These conventions are handy for piping images betweenprograms.On most non-Unix systems, you say:	cjpeg [switches] imagefile jpegfileor	djpeg [switches] jpegfile  imagefilei.e., both the input and output files are named on the command line.  Thisstyle is a little more foolproof, and it loses no functionality if you don'thave pipes.  (You can get this style on Unix too, if you prefer, by definingTWO_FILE_COMMANDLINE when you compile the programs; see install.doc.)You can also say:	cjpeg [switches] -outfile jpegfile  imagefileor	djpeg [switches] -outfile imagefile  jpegfileThis syntax works on all systems, so it is useful for scripts.The currently supported image file formats are: PPM (PBMPLUS color format),PGM (PBMPLUS gray-scale format), BMP, Targa, and RLE (Utah Raster Toolkitformat).  (RLE is supported only if the URT library is available.)cjpeg recognizes the input image format automatically, with the exceptionof some Targa-format files.  You have to tell djpeg which format to generate.JPEG files are in the defacto standard JFIF file format.  There are other,less widely used JPEG-based file formats, but we don't support them.All switch names may be abbreviated; for example, -grayscale may be written-gray or -gr.  Most of the "basic" switches can be abbreviated to as little asone letter.  Upper and lower case are equivalent (-BMP is the same as -bmp).British spellings are also accepted (e.g., -greyscale), though for brevitythese are not mentioned below.CJPEG DETAILSThe basic command line switches for cjpeg are:	-quality N	Scale quantization tables to adjust image quality.			Quality is 0 (worst) to 100 (best); default is 75.			(See below for more info.)	-grayscale	Create monochrome JPEG file from color input.			Be sure to use this switch when compressing a grayscale			BMP file, because cjpeg isn't bright enough to notice			whether a BMP file uses only shades of gray.  By			saying -grayscale, you'll get a smaller JPEG file that			takes less time to process.	-optimize	Perform optimization of entropy encoding parameters.			Without this, default encoding parameters are used.			-optimize usually makes the JPEG file a little smaller,			but cjpeg runs somewhat slower and needs much more			memory.  Image quality and speed of decompression are			unaffected by -optimize.	-progressive	Create progressive JPEG file (see below).	-targa		Input file is Targa format.  Targa files that contain			an "identification" field will not be automatically			recognized by cjpeg; for such files you must specify			-targa to make cjpeg treat the input as Targa format.			For most Targa files, you won't need this switch.The -quality switch lets you trade off compressed file size against quality ofthe reconstructed image: the higher the quality setting, the larger the JPEGfile, and the closer the output image will be to the original input.  Normallyyou want to use the lowest quality setting (smallest file) that decompressesinto something visually indistinguishable from the original image.  For thispurpose the quality setting should be between 50 and 95; the default of 75 isoften about right.  If you see defects at -quality 75, then go up 5 or 10counts at a time until you are happy with the output image.  (The optimalsetting will vary from one image to another.)-quality 100 will generate a quantization table of all 1's, minimizing lossin the quantization step (but there is still information loss in subsampling,as well as roundoff error).  This setting is mainly of interest forexperimental purposes.  Quality values above about 95 are NOT recommended fornormal use; the compressed file size goes up dramatically for hardly any gainin output image quality.In the other direction, quality values below 50 will produce very small filesof low image quality.  Settings around 5 to 10 might be useful in preparing anindex of a large image library, for example.  Try -quality 2 (or so) for someamusing Cubist effects.  (Note: quality values below about 25 generate 2-bytequantization tables, which are considered optional in the JPEG standard.cjpeg emits a warning message when you give such a quality value, because someother JPEG programs may be unable to decode the resulting file.  Use -baselineif you need to ensure compatibility at low quality values.)The -progressive switch creates a "progressive JPEG" file.  In this type ofJPEG file, the data is stored in multiple scans of increasing quality.  If thefile is being transmitted over a slow communications link, the decoder can usethe first scan to display a low-quality image very quickly, and can thenimprove the display with each subsequent scan.  The final image is exactlyequivalent to a standard JPEG file of the same quality setting, and the totalfile size is about the same --- often a little smaller.  CAUTION: progressiveJPEG is not yet widely implemented, so many decoders will be unable to view aprogressive JPEG file at all.Switches for advanced users:	-dct int	Use integer DCT method (default).	-dct fast	Use fast integer DCT (less accurate).	-dct float	Use floating-point DCT method.			The float method is very slightly more accurate than			the int method, but is much slower unless your machine			has very fast floating-point hardware.  Also note that			results of the floating-point method may vary slightly			across machines, while the integer methods should give			the same results everywhere.  The fast integer method			is much less accurate than the other two.	-restart N	Emit a JPEG restart marker every N MCU rows, or every			N MCU blocks if "B" is attached to the number.			-restart 0 (the default) means no restart markers.	-smooth N	Smooth the input image to eliminate dithering noise.			N, ranging from 1 to 100, indicates the strength of			smoothing.  0 (the default) means no smoothing.	-maxmemory N	Set limit for amount of memory to use in processing			large images.  Value is in thousands of bytes, or			millions of bytes if "M" is attached to the number.			For example, -max 4m selects 4000000 bytes.  If more			space is needed, temporary files will be used.	-verbose	Enable debug printout.  More -v's give more printout.	or  -debug	Also, version information is printed at startup.The -restart option inserts extra markers that allow a JPEG decoder toresynchronize after a transmission error.  Without restart markers, any damageto a compressed file will usually ruin the image from the point of the errorto the end of the image; with restart markers, the damage is usually confinedto the portion of the image up to the next restart marker.  Of course, therestart markers occupy extra space.  We recommend -restart 1 for images thatwill be transmitted across unreliable networks such as Usenet.The -smooth option filters the input to eliminate fine-scale noise.  This isoften useful when converting dithered images to JPEG: a moderate smoothingfactor of 10 to 50 gets rid of dithering patterns in the input file, resultingin a smaller JPEG file and a better-looking image.  Too large a smoothingfactor will visibly blur the image, however.Switches for wizards:	-baseline	Force baseline-compatible quantization tables to be			generated.  This clamps quantization values to 8 bits			even at low quality settings.  (This switch is poorly			named, since it does not ensure that the output is			actually baseline JPEG.  For example, you can use			-baseline and -progressive together.)	-qtables file	Use the quantization tables given in the specified			text file.	-qslots N[,...] Select which quantization table to use for each color			component.	-sample HxV[,...]  Set JPEG sampling factors for each color component.	-scans file	Use the scan script given in the specified text file.The "wizard" switches are intended for experimentation with JPEG.  If youdon't know what you are doing, DON'T USE THEM.  These switches are documentedfurther in the file wizard.doc.DJPEG DETAILSThe basic command line switches for djpeg are:	-colors N	Reduce image to at most N colors.  This reduces the	or -quantize N	number of colors used in the output image, so that it			can be displayed on a colormapped display or stored in			a colormapped file format.  For example, if you have			an 8-bit display, you'd need to reduce to 256 or fewer			colors.  (-colors is the recommended name, -quantize			is provided only for backwards compatibility.)	-fast		Select recommended processing options for fast, low			quality output.  (The default options are chosen for			highest quality output.)  Currently, this is equivalent			to "-dct fast -nosmooth -onepass -dither ordered".	-grayscale	Force gray-scale output even if JPEG file is color.			Useful for viewing on monochrome displays; also,			djpeg runs noticeably faster in this mode.	-scale M/N	Scale the output image by a factor M/N.  Currently			the scale factor must be 1/1, 1/2, 1/4, or 1/8.			Scaling is handy if the image is larger than your			screen; also, djpeg runs much faster when scaling			down the output.	-bmp		Select BMP output format (Windows flavor).  8-bit			colormapped format is emitted if -colors or -grayscale			is specified, or if the JPEG file is gray-scale;			otherwise, 24-bit full-color format is emitted.	-gif		Select GIF output format.  Since GIF does not support			more than 256 colors, -colors 256 is assumed (unless			you specify a smaller number of colors).  If you			specify -fast, the default number of colors is 216.	-os2		Select BMP output format (OS/2 1.x flavor).  8-bit			colormapped format is emitted if -colors or -grayscale			is specified, or if the JPEG file is gray-scale;			otherwise, 24-bit full-color format is emitted.	-pnm		Select PBMPLUS (PPM/PGM) output format (this is the			default format).  PGM is emitted if the JPEG file is			gray-scale or if -grayscale is specified; otherwise			PPM is emitted.	-rle		Select RLE output format.  (Requires URT library.)	-targa		Select Targa output format.  Gray-scale format is			emitted if the JPEG file is gray-scale or if			-grayscale is specified; otherwise, colormapped format			is emitted if -colors is specified; otherwise, 24-bit			full-color format is emitted.Switches for advanced users:	-dct int	Use integer DCT method (default).	-dct fast	Use fast integer DCT (less accurate).	-dct float	Use floating-point DCT method.			The float method is very slightly more accurate than			the int method, but is much slower unless your machine			has very fast floating-point hardware.  Also note that			results of the floating-point method may vary slightly			across machines, while the integer methods should give			the same results everywhere.  The fast integer method			is much less accurate than the other two.	-dither fs	Use Floyd-Steinberg dithering in color quantization.	-dither ordered	Use ordered dithering in color quantization.	-dither none	Do not use dithering in color quantization.			By default, Floyd-Steinberg dithering is applied when			quantizing colors; this is slow but usually produces			the best results.  Ordered dither is a compromise

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -