Patent ID: 8184178

Claim:
A method for adjusting a compression ratio of a Joint Photographic Experts Group (JPEG) image, applicable to generate a compression parameter consistent with a JPEG image file, comprising: obtaining a raw image, a first compression parameter (SF1), and a second compression parameter (SF2); using the first compression parameter and the second compression parameter to compress the raw image respectively to obtain a first file and a second file of the compressed raw image; setting a target file size (Target); using the target file size, the size of the first file (FileSize1), and the size of the second file (FileSize2) to calculate a target compression parameter (NSF) that is generated according to the following equation: log ⁡ ( NSF ) = log ⁡ ( SF ⁢ ⁢ 1 SF ⁢ ⁢ 2 ) log ( FileSize ⁢ ⁢ 1 FileSize ⁢ ⁢ 2 ) × log ⁡ ( Target FileSize ⁢ ⁢ 1 ) + log ⁡ ( SF ⁢ ⁢ 1 ) ; and loading the target compression parameter to compress the raw image, so as to output a target image.