📄 352-354.html
字号:
<HTML>
<HEAD>
<META name=vsisbn content="1558515682"><META name=vstitle content="Java Digital Signal Processing"><META name=vsauthor content="Douglas A. Lyon"><META name=vsimprint content="M&T Books"><META name=vspublisher content="IDG Books Worldwide, Inc."><META name=vspubdate content="11/01/97"><META name=vscategory content="Web and Software Development: Programming, Scripting, and Markup Languages: Java"><TITLE>Java Digital Signal Processing:Digital Images and Image Formats</TITLE>
<!-- HEADER --><STYLE type="text/css"> <!-- A:hover { color : Red; } --></STYLE><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<!--ISBN=1558515682//-->
<!--TITLE=Java Digital Signal Processing//-->
<!--AUTHOR=Douglas A. Lyon//-->
<!--PUBLISHER=IDG Books Worldwide, Inc.//-->
<!--IMPRINT=M & T Books//-->
<!--CHAPTER=8//-->
<!--PAGES=352-354//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="345-352.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="../ch09/355-361.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<H4 ALIGN="LEFT"><A NAME="Heading17"></A><FONT COLOR="#000077">VEC</FONT></H4>
<P>The VEC format is a simple native vector file format used by DiffCAD. Data in the file is integer ASCII data. There are no other markers in the file. Two types are used in the format: POINT and VECTOR.
</P>
<P>Points are stored as ASCII decimal numbers and are composed of two coordinates (x and y) that are separated by spaces or tabs. Points are separated by newlines (linefeeds). Here is a file describing a 3-pixel square.</P>
<!-- CODE SNIP //-->
<PRE>
0 0
3 0
3 3
0 3
</PRE>
<!-- END CODE SNIP //-->
<P>Storing separate points can be useful for describe shapes and objects. Edge detection (see Chapter 9) of an image can create this sort of output. Also, this format can be used for computer vision and vector display applications.
</P>
<P>The VECTOR type of data is specified in a similar manner except that two points are defined per line as follows:</P>
<!-- CODE SNIP //-->
<PRE>
x1 y1 x2 y2
x3 y3 x4 y4
...
</PRE>
<!-- END CODE SNIP //-->
<P>Here, (x1, y1) defines the tail of a vector and (x2, y2) defines the head:
</P>
<!-- CODE SNIP //-->
<PRE>
[(x1, y1), (2,y2)]
</PRE>
<!-- END CODE SNIP //-->
<BLOCKQUOTE>
<P><FONT SIZE="-1"><HR><B>NOTE: </B>DiffCAD has a routine to convert from xy points to vectors.<HR></FONT>
</BLOCKQUOTE>
<H4 ALIGN="LEFT"><A NAME="Heading18"></A><FONT COLOR="#000077">PICT</FONT></H4>
<P>The PICT format can incorporate both bitmap and vector data. DiffCAD can write PICT vector data only. PICT is a fairly complex format, and few details will be shown here. PICT can use two different forms of compression: JPEG and PackBits. PackBits is an RLE-type encoding scheme.
</P>
<H3><A NAME="Heading19"></A><FONT COLOR="#000077">Summary</FONT></H3>
<P>Digital image file formats are defined by several characteristics: the type of file format (vector, bitmap, or other), the size efficiency based on the compression technology used, the number of colors handled and the supported resolution of images. Another factor useful for Internet-based graphics is progressive display, in which a partial image is shown as a graphics file is downloaded. Three formats have specific provisions for this option: GIF, PNG, and JPEG. Although the universe of graphics file formats is very large, there is a great deal of similarity between formats of the same type. One bitmap format is likely to be as capable as another. Metafile formats support vector and bitmap representations in a single format. Higher levels of abstraction are available in vector formats, which can represent 3-D objects, scenes, and worlds in 3-D formats. DiffCAD supports GIF, JPEG, PPM, VEC, and a subset of PICT.
</P><P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="345-352.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="../ch09/355-361.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<hr width="90%" size="1" noshade><div align="center"><font face="Verdana,sans-serif" size="1">Copyright © <a href="/reference/idgbooks00001.html">IDG Books Worldwide, Inc.</a></font></div>
<!-- all of the reference materials (books) have the footer and subfoot reveresed --><!-- reference_subfoot = footer --><!-- reference_footer = subfoot --></BODY></HTML><!-- END FOOTER -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -