<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1107152371076933921</id><updated>2011-11-27T17:11:19.606-08:00</updated><title type='text'>Free Technical Articles</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://freearticles4all.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1107152371076933921/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://freearticles4all.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>BrightSun</name><uri>http://www.blogger.com/profile/05037245895643805845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1107152371076933921.post-4120564819289889521</id><published>2008-07-26T07:57:00.000-07:00</published><updated>2008-07-26T07:58:23.086-07:00</updated><title type='text'>Write HBITMAP Object in to BMP File</title><content type='html'>The following Visual C++ code segment can be used to save a HBITMAP object in to BMP file format.&lt;br /&gt;&lt;br /&gt;void WriteBMPFile(HBITMAP bitmap, LPTSTR filename, HDC hDC)&lt;br /&gt;{&lt;br /&gt;BITMAP bmp;&lt;br /&gt;PBITMAPINFO pbmi;&lt;br /&gt;WORD cClrBits;&lt;br /&gt;HANDLE hf; // file handle&lt;br /&gt;BITMAPFILEHEADER hdr; // bitmap file-header&lt;br /&gt;PBITMAPINFOHEADER pbih; // bitmap info-header&lt;br /&gt;LPBYTE lpBits; // memory pointer&lt;br /&gt;DWORD dwTotal; // total count of bytes&lt;br /&gt;DWORD cb; // incremental count of bytes&lt;br /&gt;BYTE *hp; // byte pointer&lt;br /&gt;DWORD dwTmp;&lt;br /&gt;&lt;br /&gt;// create the bitmapinfo header information&lt;br /&gt;&lt;br /&gt;if (!GetObject( (bitmap, sizeof(BITMAP), (LPSTR)&amp;bmp)){&lt;br /&gt;AfxMessageBox("Could not retrieve bitmap info");&lt;br /&gt;return;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Convert the color format to a count of bits.&lt;br /&gt;cClrBits = (WORD)(bmp.bmPlanes * bmp.bmBitsPixel);&lt;br /&gt;if (cClrBits == 1)&lt;br /&gt;cClrBits = 1;&lt;br /&gt;else if (cClrBits &lt;= 4)&lt;br /&gt;cClrBits = 4;&lt;br /&gt;else if (cClrBits &lt;= 8)&lt;br /&gt;cClrBits = 8;&lt;br /&gt;else if (cClrBits &lt;= 16)&lt;br /&gt;cClrBits = 16;&lt;br /&gt;else if (cClrBits &lt;= 24)&lt;br /&gt;cClrBits = 24;&lt;br /&gt;else cClrBits = 32; &lt;br /&gt; // Allocate memory for the BITMAPINFO structure.&lt;br /&gt;if (cClrBits != 24)&lt;br /&gt;pbmi = (PBITMAPINFO) LocalAlloc(LPTR,&lt;br /&gt;sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD) * (1&lt;&lt; cClrBits));&lt;br /&gt;else&lt;br /&gt;pbmi = (PBITMAPINFO) LocalAlloc(LPTR, sizeof(BITMAPINFOHEADER));&lt;br /&gt;&lt;br /&gt;// Initialize the fields in the BITMAPINFO structure.&lt;br /&gt;&lt;br /&gt;pbmi-&gt;bmiHeader.biSize = sizeof(BITMAPINFOHEADER);&lt;br /&gt;pbmi-&gt;bmiHeader.biWidth = bmp.bmWidth;&lt;br /&gt;pbmi-&gt;bmiHeader.biHeight = bmp.bmHeight;&lt;br /&gt;pbmi-&gt;bmiHeader.biPlanes = bmp.bmPlanes;&lt;br /&gt;pbmi-&gt;bmiHeader.biBitCount = bmp.bmBitsPixel;&lt;br /&gt;if (cClrBits &lt; 24)&lt;br /&gt;pbmi-&gt;bmiHeader.biClrUsed = (1&lt;&lt;cClrBits);&lt;br /&gt;&lt;br /&gt;// If the bitmap is not compressed, set the BI_RGB flag.&lt;br /&gt;pbmi-&gt;bmiHeader.biCompression = BI_RGB;&lt;br /&gt;&lt;br /&gt;// Compute the number of bytes in the array of color&lt;br /&gt;// indices and store the result in biSizeImage.&lt;br /&gt;pbmi-&gt;bmiHeader.biSizeImage = (pbmi-&gt;bmiHeader.biWidth + 7) /8 * pbmi-&gt;bmiHeader.biHeight * cClrBits;&lt;br /&gt;// Set biClrImportant to 0, indicating that all of the&lt;br /&gt;// device colors are important.&lt;br /&gt;pbmi-&gt;bmiHeader.biClrImportant = 0;&lt;br /&gt;&lt;br /&gt;// now open file and save the data&lt;br /&gt;pbih = (PBITMAPINFOHEADER) pbmi;&lt;br /&gt;lpBits = (LPBYTE) GlobalAlloc(GMEM_FIXED, pbih-&gt;biSizeImage);&lt;br /&gt;&lt;br /&gt;if (!lpBits) {&lt;br /&gt;AfxMessageBox("writeBMP::Could not allocate memory");&lt;br /&gt;return;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Retrieve the color table (RGBQUAD array) and the bits&lt;br /&gt;if (!GetDIBits(hDC, HBITMAP(bitmap), 0, (WORD) pbih-&gt;biHeight, lpBits, pbmi,&lt;br /&gt;DIB_RGB_COLORS)) {&lt;br /&gt;AfxMessageBox("writeBMP::GetDIB error");&lt;br /&gt;return;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Create the .BMP file.&lt;br /&gt;hf = CreateFile(filename, GENERIC_READ | GENERIC_WRITE, (DWORD) 0,&lt;br /&gt;NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL,&lt;br /&gt;(HANDLE) NULL);&lt;br /&gt;if (hf == INVALID_HANDLE_VALUE){&lt;br /&gt;AfxMessageBox("Could not create file for writing");&lt;br /&gt;return;&lt;br /&gt;}&lt;br /&gt;hdr.bfType = 0x4d42; // 0x42 = "B" 0x4d = "M"&lt;br /&gt;// Compute the size of the entire file.&lt;br /&gt;hdr.bfSize = (DWORD) (sizeof(BITMAPFILEHEADER) +&lt;br /&gt;pbih-&gt;biSize + pbih-&gt;biClrUsed&lt;br /&gt;* sizeof(RGBQUAD) + pbih-&gt;biSizeImage);&lt;br /&gt;hdr.bfReserved1 = 0;&lt;br /&gt;hdr.bfReserved2 = 0;&lt;br /&gt;&lt;br /&gt;// Compute the offset to the array of color indices.&lt;br /&gt;hdr.bfOffBits = (DWORD) sizeof(BITMAPFILEHEADER) +&lt;br /&gt;pbih-&gt;biSize + pbih-&gt;biClrUsed&lt;br /&gt;* sizeof (RGBQUAD);&lt;br /&gt;&lt;br /&gt;// Copy the BITMAPFILEHEADER into the .BMP file.&lt;br /&gt;if (!WriteFile(hf, (LPVOID) &amp;hdr, sizeof(BITMAPFILEHEADER),&lt;br /&gt;(LPDWORD) &amp;dwTmp, NULL)) {&lt;br /&gt;AfxMessageBox("Could not write in to file");&lt;br /&gt;return;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Copy the BITMAPINFOHEADER and RGBQUAD array into the file.&lt;br /&gt;if (!WriteFile(hf, (LPVOID) pbih, sizeof(BITMAPINFOHEADER)&lt;br /&gt;+ pbih-&gt;biClrUsed * sizeof (RGBQUAD),&lt;br /&gt;(LPDWORD) &amp;dwTmp, ( NULL))){&lt;br /&gt;AfxMessageBox("Could not write in to file");&lt;br /&gt;return;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// Copy the array of color indices into the .BMP file.&lt;br /&gt;dwTotal = cb = pbih-&gt;biSizeImage;&lt;br /&gt;hp = lpBits;&lt;br /&gt;if (!WriteFile(hf, (LPSTR) hp, (int) cb, (LPDWORD) &amp;dwTmp,NULL)){&lt;br /&gt;AfxMessageBox("Could not write in to file");&lt;br /&gt;return;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Close the .BMP file.&lt;br /&gt;if (!CloseHandle(hf)){&lt;br /&gt;AfxMessageBox("Could not close file");&lt;br /&gt;return;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Free memory.&lt;br /&gt;GlobalFree((HGLOBAL)lpBits);&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1107152371076933921-4120564819289889521?l=freearticles4all.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://freearticles4all.blogspot.com/feeds/4120564819289889521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1107152371076933921&amp;postID=4120564819289889521' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1107152371076933921/posts/default/4120564819289889521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1107152371076933921/posts/default/4120564819289889521'/><link rel='alternate' type='text/html' href='http://freearticles4all.blogspot.com/2008/07/write-hbitmap-object-in-to-bmp-file.html' title='Write HBITMAP Object in to BMP File'/><author><name>BrightSun</name><uri>http://www.blogger.com/profile/05037245895643805845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1107152371076933921.post-370982108812290155</id><published>2008-06-01T02:43:00.000-07:00</published><updated>2008-06-01T02:44:18.820-07:00</updated><title type='text'></title><content type='html'>&lt;h2&gt;Program to Copy Screen to HBITMAP Object&lt;/h2&gt; &lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;The following code segment can be used to copy a  portion or full screen in to a HBITMAP GDI object in visual C++. This code is  tested on Visual C++ 6.0&lt;br /&gt;&lt;br /&gt;&lt;b&gt;HBITMAP CopyScreenToBitmap(int x1, int y1,  int x2, int y2)&lt;/b&gt;&lt;br /&gt;{&lt;br /&gt;HDC hScrDC, hMemDC; // screen DC and memory DC &lt;br /&gt;HBITMAP hBitmap, hOldBitmap; // handles to deice-dependent bitmaps&lt;br /&gt;int  nX, nY, nX2, nY2; // coordinates of rectangle to grab&lt;br /&gt;int nWidth, nHeight;  // DIB width and height&lt;br /&gt;int xScrn, yScrn; // screen resolution &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// create a DC for the screen and create&lt;br /&gt;// a memory DC  compatible to screen DC&lt;br /&gt;&lt;br /&gt;if((hScrDC = CreateDC("DISPLAY", NULL, NULL,  NULL))==NULL){&lt;br /&gt;AfxMessageBox("Can not create display DC");&lt;br /&gt;return  NULL;&lt;br /&gt;}&lt;br /&gt;if((hMemDC =  CreateCompatibleDC(hScrDC))==NULL)&lt;br /&gt;{&lt;br /&gt;AfxMessageBox("Can not create  compatible DC");&lt;br /&gt;return NULL;&lt;br /&gt;}&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;&lt;br /&gt;// get points of rectangle to grab&lt;br /&gt;&lt;br /&gt;nX =  x1;&lt;br /&gt;nY = y1;&lt;br /&gt;nX2 = x2;&lt;br /&gt;nY2 = y2;&lt;br /&gt;&lt;br /&gt;// get screen resolution &lt;br /&gt;&lt;br /&gt;xScrn = GetDeviceCaps(hScrDC, HORZRES);&lt;br /&gt;yScrn =  GetDeviceCaps(hScrDC, VERTRES);&lt;br /&gt;&lt;br /&gt;//make sure bitmap rectangle is visible &lt;br /&gt;&lt;br /&gt;if (nX &lt; 0)&lt;br /&gt;nX = 0;&lt;br /&gt;if (nY &lt; 0)&lt;br /&gt;nY = 0;&lt;br /&gt;if (nX2  &gt; xScrn)&lt;br /&gt;nX2 = xScrn;&lt;br /&gt;if (nY2 &gt; yScrn)&lt;br /&gt;nY2 = yScrn; &lt;br /&gt;&lt;br /&gt;nWidth = nX2 - nX;&lt;br /&gt;nHeight = nY2 - nY;&lt;br /&gt;&lt;br /&gt;// create a bitmap  compatible with the screen DC&lt;br /&gt;if((hBitmap = CreateCompatibleBitmap(hScrDC,  nWidth, nHeight))==NULL)&lt;br /&gt;{&lt;br /&gt;AfxMessageBox("Can not create compatible  bitmap");&lt;br /&gt;return NULL;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// select new bitmap into memory DC &lt;br /&gt;hOldBitmap = (HBITMAP)SelectObject(hMemDC, hBitmap);&lt;br /&gt;&lt;br /&gt;if(hOldBitmap  == NULL)&lt;br /&gt;{&lt;br /&gt;AfxMessageBox("Can not select old object");&lt;br /&gt;return  NULL;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// bitblt screen DC to memory DC&lt;br /&gt;if(!BitBlt(hMemDC, 0, 0,  nWidth, nHeight, hScrDC, nX, nY, SRCCOPY))&lt;br /&gt;{&lt;br /&gt;AfxMessageBox("Can not read  screen memory");&lt;br /&gt;return NULL;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// select old bitmap back into  memory DC and get handle to bitmap of the screen&lt;br /&gt;&lt;br /&gt;hBitmap =  (HBITMAP)SelectObject(hMemDC, hOldBitmap);&lt;br /&gt;if(hBitmap ==  NULL)&lt;br /&gt;{&lt;br /&gt;AfxMessageBox("Can not select object");&lt;br /&gt;return NULL;&lt;br /&gt;}&lt;br /&gt;//  clean up&lt;br /&gt;DeleteDC(hScrDC);&lt;br /&gt;DeleteDC(hMemDC);&lt;br /&gt;&lt;br /&gt;// return handle to  the bitmap&lt;br /&gt;&lt;br /&gt;return hBitmap;&lt;br /&gt;}&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1107152371076933921-370982108812290155?l=freearticles4all.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://freearticles4all.blogspot.com/feeds/370982108812290155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1107152371076933921&amp;postID=370982108812290155' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1107152371076933921/posts/default/370982108812290155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1107152371076933921/posts/default/370982108812290155'/><link rel='alternate' type='text/html' href='http://freearticles4all.blogspot.com/2008/06/program-to-copy-screen-to-hbitmap.html' title=''/><author><name>BrightSun</name><uri>http://www.blogger.com/profile/05037245895643805845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1107152371076933921.post-4562143769650684964</id><published>2008-05-16T20:57:00.000-07:00</published><updated>2008-05-16T20:58:34.241-07:00</updated><title type='text'></title><content type='html'>&lt;h1 align="center"&gt;Five Point Agenda for Software Development&lt;/h1&gt;             &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;             &lt;span style="font-family:Arial;font-size:85%;"&gt;With day to day modernization, our              systems are becoming more complex in nature. It is true for software              also. Compare today’s software with the software developed 20 years              back. There is a huge difference in appearance, features, ease of              use, robustness and many more things. In our early days, normal              practices of software development with Waterfall life cycle was              followed. Intense requirement analysis followed by architectural              design, coding, testing phases and finally deployment of the product              was carried out.  &lt;/span&gt;&lt;/p&gt;             &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;             &lt;span style="font-family:Arial;font-size:85%;"&gt;This development practice had its              drawbacks. It was found that requirements were changing with the              course of time and it became difficult to make changes in the design              at later stages. Integration problems were also encountered at final              stages of the development life cycle. Due to ambiguous communication              among the user and the development team the development deviated              from the actual user requirement. The total management of the              software development process was hard to maintain. &lt;/span&gt;&lt;/p&gt;             &lt;p style="text-align: justify; margin-top: 0pt; margin-bottom: 0pt;"&gt;             &lt;span style="font-family: Arial;"&gt;&lt;span style="font-size:85%;"&gt;Finally it was              realized that software development methodologies that could help  to              overcome all these kinds of anomalies should be chosen.  There              should be a common language that should be used for communication              among different parties. After carrying out studies in latest trends              in software engineering the strength of other methodologies for              software development was realized. Importance of CASE tools in              software management during the entire development life cycle is also              realized. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;             &lt;p style="text-align: justify; margin-top: 0pt; margin-bottom: 0pt;"&gt;             &lt;span style="font-family: Arial;"&gt;&lt;span style="font-size:85%;"&gt;The CASE tools like              Rational Rose® are being used nowadays very effectively for software              development process. The CASE tool uses the Unified Modeling              Language (UML) for visualizing, specifying, constructing and              documenting the artifacts of a software.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;             &lt;p style="text-align: justify; margin-top: 0pt; margin-bottom: 0pt;"&gt;             &lt;span style="font-family: Arial;"&gt;&lt;span style="font-size:85%;"&gt;The five point              agenda that most of the CASE tools recommend is discussed below.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;             &lt;p style="text-align: justify; text-indent: -0.25in; margin-left: 0.25in; margin-top: 0pt; margin-bottom: 0pt;"&gt;             &lt;b&gt;&lt;span style="font-family: Arial;"&gt;&lt;span style="font-size:85%;"&gt;1.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal; font-variant: normal; font-weight: normal; font-family: Arial;"&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial;"&gt;&lt;span style="font-size:85%;"&gt;Iterative Development &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;             &lt;p style="margin-top: 0pt; margin-bottom: 0pt;" align="justify"&gt;             &lt;span style="font-family:Arial;font-size:85%;"&gt;The software should be developed              incrementally in an iterative fashion. Each iteration results in an              executable release. In iterative development, it is very easy to              handle requirement changes even at the later stages.&lt;/span&gt;&lt;/p&gt;             &lt;p style="text-align: justify; margin-top: 0pt; margin-bottom: 0pt;"&gt;             &lt;span style="font-family: Arial;"&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;             &lt;p style="text-align: justify; text-indent: -0.25in; margin-left: 0.25in; margin-top: 0pt; margin-bottom: 0pt;"&gt;             &lt;b&gt;&lt;span style="font-family: Arial;"&gt;&lt;span style="font-size:85%;"&gt;2.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal; font-variant: normal; font-weight: normal; font-family: Arial;"&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial;"&gt;&lt;span style="font-size:85%;"&gt;Requirements Management&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;             &lt;p style="text-align: justify; margin-top: 0pt; margin-bottom: 0pt;"&gt;             &lt;span style="font-family: Arial;"&gt;&lt;span style="font-size:85%;"&gt;Requirements are              managed systematically so that finding, documenting, organizing, and              tracking a system's changing requirements becomes easy. This can be              done manually or using CASE tools.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;             &lt;p style="text-align: justify; margin-top: 0pt; margin-bottom: 0pt;"&gt;             &lt;span style="font-family: Arial;"&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;             &lt;p style="text-align: justify; text-indent: -0.25in; margin-left: 0.25in; margin-top: 0pt; margin-bottom: 0pt;"&gt;             &lt;b&gt;&lt;span style="font-family: Arial;"&gt;&lt;span style="font-size:85%;"&gt;3.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal; font-variant: normal; font-weight: normal; font-family: Arial;"&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial;"&gt;&lt;span style="font-size:85%;"&gt;Use of              Component architecture&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;             &lt;p style="margin: 0pt 0in; text-align: justify;"&gt;             &lt;span style="font-family: Arial;"&gt;             &lt;span style="font-size:85%;"&gt;The component based architecture must be used to              reduce the effective size and complexity of the solution. The              reusable components not only helps in fast development of the              software but also increases robustness.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;             &lt;p style="margin: 0pt 0in 0pt 0.25in; text-align: justify; text-indent: -0.25in;"&gt;             &lt;b&gt;&lt;span style="font-family: Arial;"&gt;             &lt;span style="font-size:85%;"&gt;4.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal; font-variant: normal; font-weight: normal; font-family: Arial;"&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial;"&gt;&lt;span style="font-size:85%;"&gt;Visual Modeling using UML&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;             &lt;p style="margin: 0pt 0in; text-align: justify;"&gt;             &lt;span style="font-family: Arial;"&gt;&lt;span style="font-size:85%;"&gt;The modeling of the              software should be done using UML notations which helps in              visualizing, specifying, constructing, and document the structure              and behavior of a system's architecture. The use of UML keeps the              end user, software architect, software developer etc. on the same              platform. UML is the common language. Everybody must talk in UML.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;             &lt;p style="margin: 0pt 0in 0pt 0.25in; text-align: justify; text-indent: -0.25in;"&gt;             &lt;b&gt;&lt;span style="font-family: Arial;"&gt;&lt;span style="font-size:85%;"&gt;5.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal; font-variant: normal; font-weight: normal; font-family: Arial;"&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial;"&gt;&lt;span style="font-size:85%;"&gt;Continuously Verify Quality&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;             &lt;p style="margin: 0pt 0in; text-align: justify;"&gt;             &lt;span style="font-family: Arial;"&gt;&lt;span style="font-size:85%;"&gt; The quality must be              verified in every iteration. It helps in the detection of              inconsistencies present in the software design. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;             &lt;p style="margin: 0pt 0in; text-align: justify;"&gt;             &lt;span style="font-family: Arial;"&gt;&lt;span style="font-size:85%;"&gt;These five points              agenda can be used in managing and controlling the entire software              development process. Practicing these guidelines enhances our              capabilities day by day. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1107152371076933921-4562143769650684964?l=freearticles4all.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://freearticles4all.blogspot.com/feeds/4562143769650684964/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1107152371076933921&amp;postID=4562143769650684964' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1107152371076933921/posts/default/4562143769650684964'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1107152371076933921/posts/default/4562143769650684964'/><link rel='alternate' type='text/html' href='http://freearticles4all.blogspot.com/2008/05/five-point-agenda-for-software.html' title=''/><author><name>BrightSun</name><uri>http://www.blogger.com/profile/05037245895643805845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1107152371076933921.post-4006306156505625799</id><published>2008-05-10T00:08:00.000-07:00</published><updated>2008-05-10T00:10:43.389-07:00</updated><title type='text'></title><content type='html'>&lt;h2 align="center"&gt;Introduction to MPEG Video&lt;/h2&gt; &lt;p&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Digital techniques              have made rapid progress in audio and video. Digital Information is              more robust and error resilient. This means that generation losses              during recording and losses in transmission can be eliminated. The              compact disk (CD) was the first consumer product to demonstrate              this. Digital recording and transmission techniques allow content              manipulation that is not possible in analog. Once audio or video is              digitized, the contents are in the form of data. Such data can be              handled in the same way as any other kind of data. However,              production standard digital video generates over 200 megabits per              second of data, and this bit rate requires extensive capacity for              storage and wide bandwidth for transmission. This extensive storage              and bandwidth requirement can be reduced by compression. Compression              is a way of expressing digital audio and video by using less data.&lt;br /&gt;           &lt;br /&gt;            MPEG is one of the most popular audio/video compression techniques              because it is not just a single standard. Instead, It is a range of              standards suitable for different applications but based on similar              principles. MPEG is an acronym for the Moving Picture Expert Group              established by ISO (International Standards Organization) and IEC              (International Electrotechnical Commission). A video is a sequence              of pictures and each picture is an array of pixels. This video data              is organized in a hierarchical fashion in an MPEG video stream. MPEG              video sequence consists of different layers, GOP, Pictures, Slices,              Macroblock, Block.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;                          &lt;span style="font-family:Arial;font-size:85%;"&gt;             &lt;b&gt;Video Sequence&lt;/b&gt;&lt;br /&gt;            Begins with a sequence header, includes one or more groups of              pictures, and ends with an end-of-sequence code.&lt;br /&gt;           &lt;br /&gt;            &lt;b&gt;Group of Pictures (GOP)&lt;/b&gt;&lt;br /&gt;            A header and a series of one or more pictures intended to allow              random access into the sequence.&lt;br /&gt;           &lt;br /&gt;            &lt;b&gt;Picture&lt;/b&gt;&lt;br /&gt;            This is primary coding unit of a video sequence. A picture consists              of three rectangular matrices representing luminance (Y) and two              chrominance (Cb and Cr) values. The Y matrix has an even number of              rows and columns. The Cb and Cr matrices are one half the size of              the Y matrix in horizontal and vertical directions.&lt;br /&gt;           &lt;br /&gt;            &lt;b&gt;Slice&lt;/b&gt;&lt;br /&gt;            It contains one or more contiguous macroblocks. The order of the              macroblocks within a slice is from left to right and top to bottom.              Slices are important in the handling of errors. If the bitstream              contains an error, the decoder can skip to start of the next slice.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;                          &lt;span style="font-family:Arial;font-size:85%;"&gt;             &lt;b&gt;Macroblock&lt;/b&gt;&lt;br /&gt;            This is basic coding unit in the MPEG algorithm. It is a 16x16 pixel              segment in a frame. If each chrominance component has one-half the              vertical and horizontal resolution of the luminance component, a              macroblock consists of four Y, one Cr, and one Cb block.&lt;br /&gt;           &lt;br /&gt;            &lt;b&gt;Block&lt;/b&gt;&lt;br /&gt;            This is smallest coding unit in the MPEG algorithm. It consists of              8x8 pixels and can be one of three types: luminance(Y), red              chrominance(Cr), or blue chrominance(Cb).&lt;br /&gt;           &lt;br /&gt;            &lt;b&gt;Picture Types&lt;/b&gt;&lt;br /&gt;            The MPEG standard specifically defines three types of pictures:&lt;br /&gt;            &lt;i&gt;Intra Pictures (I-Pictures)&lt;br /&gt;            Predicted Pictures (P-Pictures)&lt;br /&gt;            Bidirectional Pictures (B-Pictures)&lt;/i&gt;&lt;br /&gt;           &lt;br /&gt;            These three types of pictures are combined to form a group of              picture (GOP). Typical GOP structures are as follows:&lt;br /&gt;           &lt;br /&gt;            IBBPBBPBBPBBPI……&lt;br /&gt;            IPPIPPIPPIPPIP……&lt;br /&gt;            IIIIIIIIIIIIII……&lt;br /&gt;           &lt;br /&gt;            &lt;b&gt;Intra Pictures&lt;/b&gt;&lt;br /&gt;            Intra pictures, or I-Pictures, are coded using only information              present in the picture itself, and provides potential random access              points into the compressed video data. It uses only transform coding              and provide moderate compression.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;                          &lt;span style="font-family:Arial;font-size:85%;"&gt;             &lt;b&gt;Predicted Pictures&lt;/b&gt;&lt;br /&gt;            Predicted pictures, or P-Pictures, are coded with respect to the              nearest previous I or P-Pictures. This technique is called forward              prediction. P-Pictures use motion compensation to provide more              compression than is possible with I-pictures.&lt;br /&gt;           &lt;br /&gt;            &lt;b&gt;Bidirectional Pictures&lt;/b&gt;&lt;br /&gt;            Bidirectional pictures, or B-pictures, are pictures that use both a              past and future picture as a reference. This technique is called              bidirectional prediction. B-pictures provide the most compression              since it uses the past and future picture as a reference, however              the computation time is largest.&lt;br /&gt;           &lt;br /&gt;            &lt;b&gt;Encoding Intra Picture&lt;/b&gt;&lt;br /&gt;            The MPEG transform coding algorithm for Intra picture includes the              following&lt;br /&gt;            steps:&lt;br /&gt;            • Discrete cosine transform (DCT)&lt;br /&gt;            • Quantization&lt;br /&gt;            • Run-length encoding&lt;/span&gt;&lt;/p&gt; &lt;p&gt;                          &lt;span style="font-family:Arial;font-size:85%;"&gt;The 8x8 block in a picture generally contains high spatial              redundancy. To reduce this redundancy, the MPEG algorithm transforms              8x8 blocks of pixels from the spatial domain to the frequency domain              with the discrete cosine transform (DCT). The combination of DCT and              quantization results in many of the high frequency coefficients              being zero. To take maximum advantage of this, the coefficients are              organized in a zigzag order to produce long runs of zero. This              zigzag sequence is then coded with a variable length code (Huffman              Encoding), which uses shorter coded for commonly occurring pairs and              longer codes for less common pairs.&lt;br /&gt;           &lt;br /&gt;            &lt;b&gt;Encoding of Predicted Picture&lt;/b&gt;&lt;br /&gt;            A P-picture is coded with reference to a previous image (reference              image) that is an I or P pictures. Motion compensation based              prediction is used to exploit the temporal redundancy. Since the              frames are closely related, it is possible to accurately represent              or predict the data of one frame based on the data of a reference              image, provided the translation is estimated. This translation is              known as motion vector of macroblock. In P pictures, each 16x16              sized macroblock is predicted from a macroblock of a previously              encoded I picture. A search is conducted in the I frame to find the              macroblock which closely matches the macroblock under consideration              in the P frame. The difference between two macroblock is the              prediction error. This error can be coded in the DCT domain and              quantized. Finally it uses the run-length encoding and Huffman              encoding to encode the data.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;                          &lt;span style="font-family:Arial;font-size:85%;"&gt;             &lt;b&gt;Encoding of Bi-directional Pictures&lt;/b&gt;&lt;br /&gt;            A B picture is bidirectional predicted picture. Two frames are used              to predict the current B picture, the previous frame and the next              frame. Hence B pictures are coded like P pictures except the motion              vectors can reference either the previous reference picture, the              next picture, or both. Consider a B picture B. B will be predicted              from two reference frames R1 and R2. R1 is previous I/P picture and              R2 is next I/P picture. For each macroblock MB of B, find the              closest match MB1 in R1 and MB2 in R2. The predicted macroblock, PM              is calculated as given below.&lt;br /&gt;           &lt;br /&gt;            PM = NINT (a1 MB1 + a2 MB2)&lt;br /&gt;            where,&lt;br /&gt;            NINT is nearest integer operator and a1 and a2 are described below.&lt;br /&gt;            a1 = 0.5 and a2 = 0.5 if both matches are satisfactory.&lt;br /&gt;            a1 = 1 and a2 = 0 if only first match is satisfactory.&lt;br /&gt;            a1 = 0 and a2 = 1 if only second match is satisfactory.&lt;br /&gt;            a1 = 0 and a2 = 0 if neither match is satisfactory.&lt;br /&gt;           &lt;br /&gt;            Finally the error block E is computed by taking the difference of MB              and PM. This error block E is coded as per Intra coding standards.&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1107152371076933921-4006306156505625799?l=freearticles4all.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://freearticles4all.blogspot.com/feeds/4006306156505625799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1107152371076933921&amp;postID=4006306156505625799' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1107152371076933921/posts/default/4006306156505625799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1107152371076933921/posts/default/4006306156505625799'/><link rel='alternate' type='text/html' href='http://freearticles4all.blogspot.com/2008/05/introduction-to-mpeg-video-digital.html' title=''/><author><name>BrightSun</name><uri>http://www.blogger.com/profile/05037245895643805845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
