A method of generating JPEG compression files for generating a JPEG compression file from image data using a second quantization table is obtained on the basis of a Quantisierungsdatenkoeffizientenwerts and a first quantization table as a reference, said method comprising: (A) a step of deriving an image feature value from the image data before the JPEG compression; (B) a step of determining requires certain coefficient values on the basis of the image feature value; and (C) a step of deriving the Quantisierungsdatenkoeffizientenwerts, with respect to a relational expression containing the Quantisierungsdatenkoeffizientwert and the predetermined coefficient for expressing the file size of a JPEG-compressed file, using the values obtained in step (b) for the predetermined coefficient were set and setting a desired file size than the file size of JPEG compression files.