imagemagick - Unable to Set DPI for png files ImageMagik -


i using imagemagik 6.7.8 c++ library image creations raw images . problem not able set dpi file type "png" . whereas works ok jpeg,tiff . following sample code

magick::image output; magick::blob outputblob; output.read(geometry->getwidth(), geometry->getheight(), "rgba", magick::charpixel, buffer.get()); // buffer raw image output.resolutionunits(pixelsperinchresolution); const magick::geometry gm(150,150); output.density(gm); // write final output.write(&outputblob, "png"); 

if replace png jpg or tiff in call output.write see correct dpi

what observed header did contain dpi information when viewed in photoshop or irfanview . unknown reasons not visible in ms paint


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -