摘要:
Provided is a method of determining whether an image is to be re-encoded, the method including obtaining a first quantization matrix from an image file including the image, the image being encoded by quantization based on the first quantization matrix including a plurality of first quantization parameters; obtaining a second quantization matrix from a re-encoding device, the second quantization matrix including a plurality of second quantization parameters and having the same size as the first quantization matrix; determining a comparison coefficient based on elements greater than '0' among elements of a comparison matrix obtained by subtracting the first quantization matrix from the second quantization matrix; and determining that the image is to be decoded by inverse quantization based on the first quantization matrix and the decoded image is to be re-encoded by quantization based on the second quantization matrix, when the comparison coefficient is greater than a first threshold value.