the image data processing apparatus includes a position adjusting means for adjusting a paste - in position in pasting a secondary image in a primary image , an image data editing means for editing the image of a third image resulted by the pasting of the secondary image in the primary image , an image data compressing means for compressing the image data through a block encoding , an optimal value detecting means for detecting an optimal value of the compressed image data by absolutely or relatively determining an amount of the compressed data compressed by the image data compressing means , and means for automatically adjusting the paste - in position within a given space around the paste - in position so as that the amount of the compressed data becomes a minimum .