Patent ID: 8538180

Claim:
A method for generating a Joint Photographic Experts Group (JEPG) file at an encoding apparatus, the method comprising: determining a location to insert at least one restart marker by analyzing an image; entropy-encoding, by dividing the image into a plurality of segments based on the determined location for inserting the restart marker, and inserting the restart marker to the determined location in order to insert the restart marker with respect to each of the plurality of entropy-encoded segments; calculating an offset value of the at least one restart marker with respect to each of the plurality of segments, based on a data size of each of the plurality of segments and a data size of the restart marker; calculating an offset value by scan number from a start of image (SOI) marker based on the calculated offset value of the restart marker, in response to the calculated offset value of the restart marker corresponding to a last segment that is entropy-encoded; and storing the calculated offset value by scan number as additional application data.