@fmw42 i am setting density, and units, as in my original post.
I debugged image magic, and the problem is during the retrieval of resolutionUnits from the image.
After i read the image, i call to return resolution units In Image.cpp this code gets executed
Code: Select all
Magick::ResolutionType Magick::Image::resolutionUnits(void) const
{
return(constOptions()->resolutionUnits());
}
Unfortunately constOptions() are not set, or updated during the read, so it contains default values for all attributes.
This code should be updated to this:
Code: Select all
Magick::ResolutionType Magick::Image::resolutionUnits(void) const
{
return(constImage()->units());
}
Image attributes contains all the attributes setup after the read, constOptions doesnt.
Not sure how to proceed further...