"YOU AND THE ART OF ONLINE DATING" is the only product on the market that will take you step-by-step through the process of online dating, provide you with the resources to help ensure success. Get it now!
I have the same problem , I tried to use imagemagick but unfortunatelly it is doesn't work for me imagemagick.org/discourse-server/viewtop... you may check that may be it will work for you.
Thanks Vasilii. I found that thread before posting here, and nobody responded to my post there. I don't think this is something that can be done with Imagemagick or Ghostscript -- the best you can do is to remove the background manually with imagemagick.
– Jonathon Wolfe Jun 15 '09 at 19:39.
Afraid I can't tell you what ghostscript can do but I do have a suggestion. Try rendering your PDF with both a black and a white background. Any pixel that comes out the same in the two images was clearly meant to be opaque (i.e.
, alpha == 1.0). Pixels that are different have a non-zero alpha which can be computed by subtracting the black background pixel from the white background pixel. Give or take some precision, the value of any red, green or blue component will be the alpha value.
Ghostscript can handle transparency only if at build time the "transpar" option was selected. Assuming your Ghostscript is the right version, you can add a parameter on the commandline: ... -c "0 . Setopacityalpha" -f c:/path/to/file/to/be/converted.
Pdf (You can use variants for the opacity in the range 0..1). Also, have you tried to convert your Ghostscript-created . Png (in case that background indeed is white instead of transparent) to a transparent background using ImageMagick's convert or GraphicMagick's gm convert commands?
Here is an example: convert -background transparent test. Png test_transp. Png BTW, in case Acrobat or AcroReader show all page backgrounds as white: this is the default setting even for really transparent backgrounds.
You can change it in the application's setup options: IIRC the setting was inside the 'Page Display' options and named s.th. Like 'Show transparency rasters'. (If I looked it up in detail, it possibly wouldn't help too much -- Adobe keeps shifting all options around in every new release.
Just poke around there yourself, you'll find it now that you know it's there. ).
I share your experience with the -dTextAlphaBits=4 and -dGraphicsAlphaBits=4 flags. They appear not to work on all texts. The "fix" I came up with was to just render the image at 4 times the desired size, and then scale the image down.
Luckily ghostscript has no problems rendering gigapixel PNG files. Update Ghostscript (up to version 9) also seems to enjoy major problems when rendering transparent PNG's with a pixel count above 2.500.000 (i.e. 10 mb of pixel buffer).
The transparent background suddenly turns white. Drilling down the source of ghostscript, I found that when the pixel buffer size exceeds 10 mb, it switches to a different memory allocation scheme. More specifically, the image is rendered using device image32 instead of pngalpha.
Given the way the pngalpha driver is implemented, it's whole purpose vanishes when gs decides not to use its pngalpha_fill_rectangle(). Luckily, there is a switch called -dMaxBitmap=N to configure this parameter at runtime. This is mentioned in a workaround for a totally different bug dating back to 1999-01-15, see http://pages.cs.wisc.edu/~ghost/doc/AFPL/5.50/relnotes/index.htm.Adding -dMaxBitmap=2147483647 solved a lot of problems for me.
On 64 bit systems, this number can be higher. A true fix would of course be to rework the pngalpha driver so that it sets the background color to 0x7f000000 no matter the actual code path, but most systems have enough ram on board for the above trick to work.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.