Simon Budig wrote:
> Graeme Gill ( wrote:
>> If they've not actually added any of those elements, then it
>> is actually just a jpg - ie. it should be possible to save a file
>> without additional warnings to any format that is capable of
>> representing all actually used elements.
> No it is not.
> It is decompressed pixel data. It would be a pure accident if a
> recompression to JPEG would result in the same file.

Not at all, if you don't change anything and compress with the
same quantization tables, the file will be almost identical.

> The decompressed pixel data lives in a layer object, which has
> properties like e.g. a name. The layer itself lives in a container
> object, which also can contain channels and paths. There possibly are
> attached parasites, containing thumbnail and comment information. A
> default color profile has been attached if none was specified. Etc. pp.
> It just no longer is a jpeg.

Right, you've convinced yourself because of your internal storage
format that it is somehow different. But if the user hasn't changed
anything, then fundamentally it is unchanged (as far as the user
is concerned and for all practical purposes), and therefore you
are just getting yourself in a knot over purely theoretical issues.

It's not that hard - the internal and native format should (ideally)
be a superset of all possible formats that can be read or created.
Keep track of which elements are used or created in the process of
editing the image, and you can decide whether it's possible to save
back to any particular format without significant loss.

Graeme Gill.
Gimp-developer mailing list

Reply via email to