The problem (my fault) is that the size of image is created from "physical" size recorded in .gif, which is too small. When the image is converted to PNG, this info is lost (do not ask me why...) and the physical size is computed from "pixel" size (using 96DPI formula).
The necessary fix (which is useful anyway) is to introduce width/height parameters to CreateImageObject:
RichObject CreateImageObject(const Image& img, int cx, int cy)
{
RichObject o = RichObject("image", StoreImageAsString(img));
if(cx || cy)
o.SetSize(GetRatioSize(o.GetPixelSize(), cx, cy));
return o;
}
Note that you can leave cx or cy zero - image is then sized keeping the aspect ratio. If both are zero, "physical" size is used (as with recent version).
This code is now part of U++ and will be in the next release.