[Interest] Running as nobody, generating images

Harri Pasanen harri at mpaja.com
Thu Feb 9 15:00:15 CET 2012


On 02/09/2012 02:43 PM, Andreas Pakulat wrote:
> On 09.02.12 14:26:34, Harri Pasanen wrote:
>> On 02/09/2012 11:10 AM, Andreas Pakulat wrote:
>>> On 09.02.12 10:14:59, Harri Pasanen wrote:
>>>> Picking your collective brain here...
>>>>
>>>> I'm trying to do some batch style image processing with a Qt app, using
>>>> QImage.
>>>> As QCoreApplication / console everything compiled, but silently failed
>>>> at runtime.
>>>> ...
>>> Sounds like you're using QPixmap, that one is a native GUI pixmap and
>>> hence requires a GUI application that connects to whatever draws the GUI
>>> on your device (X11 on Linux). If you just want to paint something on a
>>> png, simply use QImage only and then you can go back to
>>> QCoreApplication.
>>>
>>> Andreas
>> No, I'm using QImage, actually doing drawText on it, and that does not work.
>> Fonts are probably provided by the underlying window system, perhaps that
>> is the problem?
> At least on Linux that is the case yes, no idea wether its possible to
> provide font's and font-rendering to Qt without requiring the platforms
> GUI layer to be up and running.

Yes, fonts were my problem.  QFont requires QApplication.
I can work around that, as I don't have much text.
It would be sometimes useful to have a built in font though.
Often the look-and-feel varies across platforms just because of fonts.

I realise it's a huge can of worms if anything besides ascii, fixed size
would be required.

But perhaps a solution would be to provide tools so that a bitmap
font could be baked in an application.  So taking care of the font 
selection,
sizing, locale support, etc. would be left for the developer.

Harri



More information about the Interest mailing list