Browse Prior Art Database

World Recording Algorithm to RIDIC Recording Algorithm Conversion in a Memory-Constraint System

IP.com Disclosure Number: IPCOM000117040D
Original Publication Date: 1995-Dec-01
Included in the Prior Art Database: 2005-Mar-31
Document File: 4 page(s) / 80K

Publishing Venue

IBM

Related People

Lightstone, SS: AUTHOR [+2]

Abstract

An algorithm for converting image raster data from World recording algorithm to RIDIC recording algorithm. In a World recording algorithm scan lines are recorded from the bottom to the top and left to right with each line beginning at a double word boundary. In the RIDIC recording algorithm scan lines are recorded from top to bottom and left to right with each scan line beginning at a byte boundary.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 53% of the total text.

World Recording Algorithm to RIDIC Recording Algorithm Conversion
in a Memory-Constraint System

      An algorithm for converting image raster data from World
recording algorithm to RIDIC recording algorithm.  In a World
recording algorithm scan lines are recorded from the bottom to the
top and left to right with each line beginning at a double word
boundary.  In the RIDIC recording algorithm scan lines are recorded
from top to bottom and left to right with each scan line beginning at
a byte boundary.

      RIDIC and World coordinate formats are popular image forms.
Conversions between these forms is a frequently performed operation.
However, due to the large amount of dynamic memory used by high
resolution images, many systems can encounter dynamic memory
restrictions when attempting to allocate storage to perform the
conversion.  This algorithm enables the conversion between formats in
a memory constrained system.

      The algorithm reverses the raster line order and removes any
padding byte in one operation.  At the same time it requires only
enough
memory to store one line of raster data excluding any padding bytes.

The following pseudocode describes the algorithm in detail:
  Variables:
  1.  LineWidth
        The actual width of the raster lines in bytes, excluding
       any padding byte.
  2.  NumOfPadBytes
        Number of padding bytes, if any, for each scan line in the
       buffer.  This value will be zero if there is no padding byte
       at all.
  3.  NumOfLines
        Total number of scan lines in the buffer.
  4.  Buffer
        The buffer containing the raster lines in World recording
       format.  The first raster line begins at Buffer(0), the second
       raster line begins at Buffer(LineWidth+NumOfPadBytes), and so
on.
  5.  TempLine
        A temporary buffer in memory whose size is exactly one line
       of raster data excluding any padding bytes.

Algorithm (integer arithmetic is assumed):
  1.  Define an integer variable iIsOdd and initialize it to 1 if
       NumOfLines is odd, otherwise initialize it to 0.
  2.  Allocate TempLine from memory.
  3.  Initialize a loop index variable i to 0.
  4.  ...