Dpi of png is not changing with imagemagick c++ api.
Dpi of png is not changing with imagemagick c++ api.
Hi,
I have used density(dpi) api to change the dpi of png image. dpi is not getting changed for PNG image but it works fine for JPEG image.
Please let us know whether anything I need to before or after calling density(dpi).
Thanks,
Deepak
I have used density(dpi) api to change the dpi of png image. dpi is not getting changed for PNG image but it works fine for JPEG image.
Please let us know whether anything I need to before or after calling density(dpi).
Thanks,
Deepak
Re: Dpi of png is not changing with imagemagick c++ api.
What is your ImageMagick version and operating system?
Re: Dpi of png is not changing with imagemagick c++ api.
Hi,
My imagemagick version is -6.8.9-Q16 and OS is Windows 7 64.
Thanks,
Deepak
My imagemagick version is -6.8.9-Q16 and OS is Windows 7 64.
Thanks,
Deepak
Re: Dpi of png is not changing with imagemagick c++ api.
Hi All,
could anyone help on this?
Thanks,
Deepak
could anyone help on this?
Thanks,
Deepak
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Dpi of png is not changing with imagemagick c++ api.
deepakd wrote:Hi,
I have used density(dpi) api to change the dpi of png image. dpi is not getting changed for PNG image but it works fine for JPEG image.
Please let us know whether anything I need to before or after calling density(dpi).
Thanks,
Deepak
Did you specify the units as well? IM will automatically convert dpi to dpc if proper units are specified, since png only uses dots per centimeter.
Re: Dpi of png is not changing with imagemagick c++ api.
>Did you specify the units as well? IM will automatically convert dpi to dpc if proper units are specified, since png only uses dots per centimeter.[/quote]
Hi,
We are not specifying any units. We are just giving (150,150) and DPI is not getting changed. output dpi is same as input dpi.
if(dpi.length() != 0){
const Magick::Geometry gm(boost::lexical_cast<size_t>(dpi),boost::lexical_cast<size_t>(dpi));
image.density(gm);
Thanks,
Deepak
Hi,
We are not specifying any units. We are just giving (150,150) and DPI is not getting changed. output dpi is same as input dpi.
if(dpi.length() != 0){
const Magick::Geometry gm(boost::lexical_cast<size_t>(dpi),boost::lexical_cast<size_t>(dpi));
image.density(gm);
Thanks,
Deepak
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Dpi of png is not changing with imagemagick c++ api.
try specifying the units as well. See if that makes any difference.
Re: Dpi of png is not changing with imagemagick c++ api.
Hi,
We tried giving units.
-----------------------------------------------------------------------------------------------------------
if(dpi.length() != 0){
const Magick::Geometry gm("150 cm,391 cm"); // Specified in cms
image.density(gm);
}
-----------------------------------------------------------------------------------------------------------
Still we are getting const dpi(96) always for png image. Please let us know whether the specifying units is proper or not. Providing code snippet helps much.
Thanks,
Deepak
We tried giving units.
-----------------------------------------------------------------------------------------------------------
if(dpi.length() != 0){
const Magick::Geometry gm("150 cm,391 cm"); // Specified in cms
image.density(gm);
}
-----------------------------------------------------------------------------------------------------------
Still we are getting const dpi(96) always for png image. Please let us know whether the specifying units is proper or not. Providing code snippet helps much.
Thanks,
Deepak
Re: Dpi of png is not changing with imagemagick c++ api.
Hi,fmw42 wrote:try specifying the units as well. See if that makes any difference.
We tried giving units.
-----------------------------------------------------------------------------------------------------------
if(dpi.length() != 0){
const Magick::Geometry gm("150 cm,391 cm"); // Specified in cms
image.density(gm);
}
-----------------------------------------------------------------------------------------------------------
Still we are getting const dpi(96) always for png image. Please let us know whether the specifying units is proper or not. Providing code snippet helps much.
Thanks,
Deepak
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Dpi of png is not changing with imagemagick c++ api.
One of the IM developers will need to check this out further.
Re: Dpi of png is not changing with imagemagick c++ api.
HI,
Thanks,
Deepak
Thank you for the reply. Will wait for the developer reply as I am not getting information from any source to solve this issue.fmw42 wrote:One of the IM developers will need to check this out further.
Thanks,
Deepak
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Dpi of png is not changing with imagemagick c++ api.
You could post this issue on the Bugs forum.
Re: Dpi of png is not changing with imagemagick c++ api.
Able to see change in dpi using irfan viewer.