Generated image background is grey. Potentially related to new version of gm
See original GitHub issueThis wasn’t happening until a week ago or so.
I’ve noticed that ImageGraphick released a new version 7.1.0-22 a week ago, but running the convert
manually generates a transparent background, instead of this ugly greyish one.
Same happens when converting to jpg, but running it manually creates a white background.
As I said, this started happening only a week ago, when I probably accidentally upgraded it using brew, and I can’t seem to install an older version (not sure how to setup paths on macos…)
Steps to reproduce
install and get a reference correct output:
brew install graphicsmagick
brew install imagemagick
convert sample.pdf output.png
and then, if you were to run this example on the same pdf, the result will have a greyed background.
screenshot of the actual pdf:
generated png:
in case it’d be useful, here are my options for the app I’m running this on:
{
density: 96,
saveFilename,
savePath: destinationPath,
format: "png",
height: finalHeight,
width: finalWidth,
}
if you can’t really help me, maybe you could teach me how to install older versions of ImageGraphick so I could see if those work well?
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top GitHub Comments
@irgipaulius I have had the same issue and had forked the code to see if I could fix it, when I noticed that it seems better when using imagemagick vs graphicsmagick. i.e. when doing a conversion like this:
const fp = fromPath(filepath, options); fp.setGMClass(“imagemagick”); /* This being the key difference */ let r = await fp.bulk(pageIdx, false)
Hope that helps a) you fix your issue and b) the maintainers debug things if its deemed to be an issue!
@irgipaulius Thank you for that. I’ll have to check that out.