Open gopal-augment opened 3 years ago
Please post your input PDF file.
PDF.
Please get the PDF from the above link. And the page number 8 we are facing that white background around it, other pages looks fine.
The histogram of that page shows a fully opaque alpha channel with white underneath it.
500559: (65535,65535,65535,65535) #FFFFFFFFFFFFFFFF white
So you cannot just turn off the alpha channel and expect anything other than white. You would have to fuzzy change white to black. But that would leave artifacts.
Not understand. What should I change in my convert command. That should convert all types of PDFs to the correct image. Please let me know
What does the "correct" image look like? What do you want in place of white?
Should the same as on Pdf pages. don't want add any background or cutoff
I do not understand. What do you see as the background? I just see white.
On page 7, I can see white color around the image. So we dont want that
That page is padded with transparency. You can add -trim to your command to remove it.
convert -density 150 -colorspace sRGB pdf[0].pdf -trim -quality 100 out.jpg
If I use -trim, it will cut off the top and bottom in the last page pdf.
I will have to leave this to the IM developers.
Okay. I'm looking forward
Prerequisites
ImageMagick version
6
Operating system
Linux
Operating system, version and so on
20.04
Description
convert -density 150 -alpha remove -colorspace sRGB pdf[0].pdf -quality 100 out.jpg
After converting to JPG, it created with white background around it
Steps to Reproduce
convert -density 150 -alpha remove -colorspace sRGB pdf[0].pdf -quality 100 out.jpg
After converting to JPG, it created with white background around it
convert -density 150 -alpha remove -colorspace sRGB pdf[0].pdf -quality 100 out.jpg
After converting to JPG, it created with white background around it