Patent ID: 8184327

Claim:
An image data processing apparatus comprising: a first memory for use in storing compressed image data; a second memory for use in storing a portion of the image data which has been decompressed and rotated; and a third memory for use in storing an entirety of the image data which has been decompressed, rotated, and re-compressed; wherein a total capacity of the first, second, and third memories is constant; the image data processing apparatus further comprising: a capacity decision unit constructed to decide the capacity of the first memory such that the compressed image data can be stored, decide the capacity of the third memory such that the entirety of the re-compressed image data can be stored, and decide the capacity of the second memory by subtracting the capacity of the first memory and the capacity of the third memory from the constant total capacity; a segmentation number decision unit constructed to decide a number of image data segments for the image data based on (i) a data size obtained by decompressing the image data stored in the first memory and (ii) the capacity of the second memory; a decompression unit constructed to decompress the image data read out from the first memory and repeat an operation of outputting one of the image data segments obtained by segmenting the decompressed image data into the decided number of image data segments and discarding the rest of the image data segments, thereby sequentially outputting the decided number of the image data segments one by one; a rotation unit constructed to sequentially perform a rotation process on the image data segments output from the decompression unit, and sequentially store the rotated image data segments in the second memory; and a compression unit constructed to compress the rotated image data segments read out from the second memory and store the rotated and compressed image data segments in the third memory, wherein in sequentially outputting the image data segments one by one, the decompression unit outputs a next one of the image data segments after the rotated and compressed image data segment originated from a previously output one of the image data segments has been stored in the third memory by the compression unit.