US6400851B1ExpiredUtility

Rotating image data

Assignee: MICROSOFT CORPPriority: Jan 28, 1999Filed: Jan 28, 1999Granted: Jun 4, 2002
Est. expiryJan 28, 2019(expired)· nominal 20-yr term from priority
Inventors:Yung-Ho Shih
G09G 2330/021G06T 3/602G09G 2340/0492G09G 5/393
70
PatentIndex Score
38
Cited by
16
References
16
Claims

Abstract

Rotating image data ninety degrees is disclosed. In one embodiment of the invention, the computerized system includes an operating system providing a graphics interface library, and a graphics interface buffer maintained by the graphics interface library. The graphics interface buffer contains image data comprising a first screen image. The system also includes a graphics device driver that implements a method to rotate an area within the image data by dividing the area into a plurality of square pixel regions, rotating each of the squares, and writing the squares to an image data buffer comprising a display buffer maintained by the graphics device driver.

Claims

exact text as granted — not AI-modified
I claim:  
     
       1. A method for rotating an area within image data, the method comprising: 
       dividing the area into square regions of pixels based on a word size and a bits per pixel size, said square having a plurality of rows;  
       rotating each row of each square region by expanding one or more bytes containing a plurality of pixel values for the row into an expanded row word;  
       combining each expanded row word to provide a rotated square region; and  
       translating the rotated square region to provide a rotated area of image data.  
     
     
       2. A method for a computer having a word size to rotate an area within image data, the method comprising: 
       dividing the area into a square region of pixels, said pixels having a number of bits specifying a color, said square region having a plurality of rows, a size of a side of said square region being determined by the word size of the computer and the number of bits specifying the color;  
       for each row in the square area executing the tasks of:  
       expanding one or more bytes representing the row into a word by multiplying the one or more bytes by an expansion constant determined by the word size and the number of bits specifying the color,  
       masking bits from the word by performing a logical AND of the word with a filter constant determined by the number of bits specifying the color, and  
       left shifting the word by a number of places determined by the index of the row in the square and the number of bits specifying color and placing the result into one of a plurality of expansion rows;  
       performing a logical OR of the plurality of expansion rows to produce a rotated square region of pixels; and  
       performing a translation along an X and Y axis to place the rotated square region into a rotated image buffer.  
     
     
       3. The method of  claim 2 , wherein the color is a gray scale level. 
     
     
       4. The method of  claim 2 , wherein the number of bits specifying the color is two (2), the word size is thirty two (32) bits, the size of a side of the square region is four (4) pixels, the expansion constant is a hexadecimal value 0x41041, and the filter constant is a hexadecimal value 0x03030303. 
     
     
       5. The method of  claim 2 , wherein the number of bits specifying the color is one (1), the word size is sixty four (64) bits, and the size of a side of the square region is eight (8) pixels. 
     
     
       6. The method of  claim 2 , wherein the number of bits specifying the color is four (4), the word size is sixteen (16) bits, and the size of a side of the square region is two (2) pixels. 
     
     
       7. The method of  claim 2 , wherein the number of bits specifying the color is four (4), the word size is sixty four (64) bits, and the size of a side of the square region is four (4) pixels. 
     
     
       8. The method of  claim 2 , wherein the tasks performed for each row further comprises: 
       setting a group of bits representing a color of a last pixel in the row to zero before expanding the row; and  
       resetting a group of bits representing the color of the last pixel in the row to an original value after expanding the row.  
     
     
       9. A computer-readable medium having computer-executable instructions for a computer to perform a method comprising: 
       dividing an area of image data into square regions of pixels based on a word size and a bits per pixel size, said square having a plurality of rows;  
       rotating each row of each square region by expanding one or more bytes containing a plurality of pixel values into an expanded row word having one or more bytes;  
       combining each expanded row word to provided a rotated square region; and  
       translating the rotated square region to provide a rotated area of image data.  
     
     
       10. A computer-readable medium having computer-executable instructions for a computer having a word size to perform a method for rotating an area of image data, the method comprising: 
       dividing the area into a square region of pixels, said pixels having a number of bits specifying a color, said square having a plurality of rows, a size of a side of said square region being determined by the word size of the computer and the number of bits specifying the color;  
       for each row in the square area executing the tasks of:  
       expanding one or more bytes representing a row into a word by multiplying the value represented by the one or more bytes by an expansion constant determined by the word size and the number of bits specifying the color,  
       masking bits in the word by performing a logical AND of the word with a filter constant determined by the number of bits specifying the color, and  
       left shifting the word by a number of places determined by the index of the row in the square and the number of bits specifying color and placing the result into one of a plurality of expansion rows;  
       performing a logical OR of the plurality of expansion rows to produce a rotated square region of pixels; and  
       performing a translation along an X and Y axis to place the rotated square region into a rotated image buffer.  
     
     
       11. The computer readable medium of  claim 10 , wherein the color is a gray scale level. 
     
     
       12. The computer readable medium of  claim 10 , wherein the number of bits specifying the color is two (2), the word size is thirty two (32) bits, the size of a side of the square region is four (4) pixels, the expansion constant is a hexadecimal value 0x41041, and the filter constant is a hexadecimal value 0x03030303. 
     
     
       13. The computer readable medium of  claim 10 , wherein the number of bits specifying the color is one (1), the word size is sixty four (64) bits, and the size of a side of the square region is eight (8) pixels. 
     
     
       14. The computer readable medium of  claim 10 , wherein the number of bits specifying the color is four (4), the word size is sixteen (16) bits, and the size of a side of the square region is two (2) pixels. 
     
     
       15. The computer readable medium of  claim 10 , wherein the number of bits specifying the color is four (4), the word size is sixty four (64) bits, and the size of a side of the square region is four (4) pixels. 
     
     
       16. The computer readable medium of  claim 10 , wherein the tasks performed for each row further comprises: 
       setting a group of bits representing a color of a last pixel in the row to zero before expanding the row; and  
       resetting a group of bits representing the color of the last pixel in the row to an original value after expanding the row.

Join the waitlist — get patent alerts

Track US6400851B1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.