I frequently use pdfimages to extract graphic images from pdf files. A lot of the time, I find that the extracted image seems to be in two parts - the original image and a grey-scale mask that screens out the unwanted parts of the original image.
What I'm having a problem with is making the image look like it does in the pdf. I can always use the workaround of zooming in on the image and doing a screen capture, but that seems clumsy and doesn't work if there is text over the image.
However I haven't been able to come up with a working alternative.
Here's a concrete example. I have a head shot of a person with a white/transparent background in the original pdf. The extracted image has a dark background.
The pdf's mask image is grey scale with the background part black and the person's shape white. The border between the two is feathered, a thin grey area between the black & white.
Using GIMP, I open the main image and add an alpha channel since it seems not to have one. Next I open the mask as a new layer and add an alpha channel to it too. Then I add a layer mask to it as transparent according to the grey-scale of the mask image.
This leaves me with a dark background rather than than a transparent one.
Any suggestions on how I can do this? Sorry if this is a newby question but I'm far from a graphics pro.