The images load up in GIMP just fine, but the "modified" flag has been set. There is an '*' next to the file name in the title bar, and if you try to close the image, GIMP asks if you want to save the changes. Though there are no visible changes to the image.

The images load up in GIMP just fine, but the "modified" flag has been set. There is an '*' next to the file name in the title bar, and if you try to close the image, GIMP asks if you want to save the changes. Though there are no visible changes to the image.

What am I doing wrong?

I get the same result. image.dirty is True, so that's coherent. Unfortunately, image.dirty cannot be written. Good question to ask to the gimp-developer mailing list.

The plug-in I'm working on is an interface for managing multiple pages of a book (adding, removing, reordering and exporting pages) mainly meant for comics work. I'll be sure to post it here when it's done.

Reading the Additional information in the procedure browser for gimp-image-clean-all gives a clue:

This procedure sets the specified image's dirty count to
0, allowing operations to occur without having a 'dirtied'
image. This is especially useful for creating and loading
images which should not initially be considered dirty,
even though layers must be created, filled, and installed
in the image. Note that save plug-ins must NOT call this
function themselves after saving the image.

So, although you are only loading an image, GIMP is having to create layer(s) and fill them with the image - which it obviously counts as having modified the image.

Reading the Additional information in the procedure browser for gimp-image-clean-all gives a clue:

This procedure sets the specified image's dirty count to
0, allowing operations to occur without having a 'dirtied'
image. This is especially useful for creating and loading
images which should not initially be considered dirty,
even though layers must be created, filled, and installed
in the image. Note that save plug-ins must NOT call this
function themselves after saving the image.

So, although you are only loading an image, GIMP is having to create layer(s) and fill them with the image - which it obviously counts as having modified the image.

I've seen that too, but the logic is a bit dubious... "File/Open" doesn't set the dirty flag, and I don't see any functional difference with gimp-file-load-(). And neither does File/New, btw....