Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Looking for a converter
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3610

PostPosted: Sun May 22, 2022 5:53 pm    Post subject: Looking for a converter Reply with quote

Hi, ALL,
I'm looking for a converter that can grab a PDF (which contains an image) and converts it to the PNG mage keeping transparency.
The portion of the image does contain white color, which will needs to be preserved - only background needs to be transparent.

Can GIMP do that?

Or maybe some other software?

Thank you.
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3131

PostPosted: Sun May 22, 2022 10:42 pm    Post subject: Reply with quote

Well, gimp does support transparency, so you can use it to save that image (and even has a "create new from clipboard" option)
If you have issues copying images from pdf using a pdf reader, you can use libreoffice draw for that. Requires USE=pdfimport.
It is far from a perfect, but it can access components and modify those documents.

I wonder if there is some way to automate it though. Gimp is not exactly a light-weight software... And it won't run unattended.
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2961
Location: Edge of marsh USA

PostPosted: Mon May 23, 2022 4:04 am    Post subject: Reply with quote

Consider media-gfx/inkscape
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
Goverp
Veteran
Veteran


Joined: 07 Mar 2007
Posts: 1997

PostPosted: Mon May 23, 2022 9:08 am    Post subject: Reply with quote

pdfimages?
_________________
Greybeard
Back to top
View user's profile Send private message
Geneslaf
n00b
n00b


Joined: 07 Jul 2014
Posts: 8

PostPosted: Mon May 23, 2022 10:30 am    Post subject: Reply with quote

You might want to take a look at https://gist.github.com/innermond/d110d6234123bf87cc04.

As it points out the image and it alpha channel are stored as two images in the pdf. You can use pdimages (from app-text/poppler) to extract the images from the pdf and then use convert (from media-gfx/imagemagick) to recombine the image and alpha channels.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum