SaveDefinitions->True changes the displayed image
Try this:
img = Image@ImageData@Import["http://i.stack.imgur.com/xKudh.png"];
Manipulate[img, {p, Locator}, SaveDefinitions -> True]
or this
img = Import["http://i.stack.imgur.com/xKudh.png"];
Manipulate[
img = Quiet[img /. ColorProfileData[] -> Automatic], {p, Locator},
SaveDefinitions -> True]
I think the problem is how the image is stored when it is imported. I do not know anything about this, so perhaps others better versed in image processing will know what it is. Here is an image of the FullForm
of Import["http://i.stack.imgur.com/xKudh.png"]
:
When Manipulate
converts it to some saved format, it must be mangling the ColorSpace
option. It gets converted to ColorSpace -> ColorProfileData[]
, which is invalid. Setting it to Automatic
seems to work, except that in generates a message somewhere in the Manipulate
; hence the Quiet
.
It seems to be a bug, but in the meantime, you have a workaround.
This isn't really an answer, but I sent the question to Wolfram. They replied:
The problem reported by you about SaveDefinitions option with Manipulate was reproducible. It has been forwarded to the development team for further investigation. You will be informed via email when it gets fixed.
I'll report back here if they respond.
Update: version 10.3.1 which is said to have "More robust import of image file formats, including JPEG and TIFF" still experiences the same odd behavior.