Scribus Forums

Scribus => Raster and Vector Graphics => Bitmap Images => Topic started by: shngrdnr on June 09, 2011, 11:04:44 AM

Title: Export of transparent PNG
Post by: shngrdnr on June 09, 2011, 11:04:44 AM
I want to export an image from Scribus as a png file with transparency - all exports so far have given the image a white background.  I notice on bug.scribus.net (https://bugs.scribus.net/view.php?id=9687 (https://bugs.scribus.net/view.php?id=9687)) that the issue has already been addressed by user ale:

Quote
indeed i could get a PNG with a transparent background by outcommenting the line

painter->clear(Doc->papColor);

in QImage ScribusView::PageToPixmap().

it may be necessary to do the same for ScribusView::MPageToPixmap() ...

now, i just have to find out, how to pass the value from a new checkbox in the export to PNG dialog...

However, ale hasn't mentioned which file to edit, or where to find it on a PC (operating Win XP SP3).  Feels like a stupid question but there it is.  Anyone help please?
Title: Re: Export of transparent PNG
Post by: Nermander on June 09, 2011, 02:15:11 PM
He is talking about the Scribus source code, so it is nothing you can edit in your installed Scribus.
Title: Re: Export of transparent PNG
Post by: shngrdnr on June 09, 2011, 03:02:38 PM
Fair enough Nermander - so there's absolutely no way around it?  Well, fair enough - I guess from what ale says it'll be available in a future version, I'll just export as normal and edit in PS till then...
Title: Re: Export of transparent PNG
Post by: a.l.e on June 09, 2011, 09:03:02 PM
may i ask you why do you want to export to png?

basically, exporting to png is not really a key feature for scribus.... so there are not that many chances that the devs will focus on it soon :-)

... and myself i wonder a bit why i should spend more time on it...

any good reason?
Title: Re: Export of transparent PNG
Post by: shngrdnr on June 10, 2011, 09:48:32 AM
Quotemay i ask you why do you want to export to png?

basically, exporting to png is not really a key feature for scribus.... so there are not that many chances that the devs will focus on it soon :-)

... and myself i wonder a bit why i should spend more time on it...

any good reason?

Hey a.l.e

That's a fair question.  To me, my reason is good, but I doubt many others would have exactly similar needs.

I'm currently writing a webcomic, which is located here (http://www.basement-garden.co.uk) - it's part-animated in a Flash program, Swishmax.  As I go along I'm also preparing a print version, which I compile in Scribus (I intend to crowdfund in a few months, and I want to offer the print version as a reward, and to sell at conventions and so on).  Typically, I prepare the print version first, and then move on to the Flash version after I'm happy with the layout there.

When I compile the comic, I use a series of pre-prepared images as backgrounds for the text - these are scans of thick inked lines - which I arrange in Scribus until I'm happy.   When I'm happy with the text, I export the inklines as a single PNG for import into Swishmax, where I rewrite the text over the lines, to ensure consistency (I used to export the text as a vector and then reimport into Swish, but this was really inefficient).  Because Scribus exports non-transparent PNGs, I have to make use of Photoshop in an intermediary stage, removing all the white areas that the program has exported. 

So that's the reason.  As I say, it's a fairly uncommon scenario, I'm sure - but I'm fairly confident that other scenarios exist that would mean that a similar transparent PNG export would be useful.  As it says in the bugs.Scribus posting (http://bugs.scribus.net/view.php?id=9687), several users have already asked for it.  That said, I understand if you don't want to implement this - it is your time after all.
Title: Re: Export of transparent PNG
Post by: Nermander on June 10, 2011, 12:19:47 PM
Have you looked at exporting to PDF and use for example ImageMagick to convert the PDF to PNG?