Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 6

Qt-interest Archive, March 2007
QImage and EPS file


Message 1 in thread

Hi list,

does anybody know a way of displaying eps files using QImage (or
anything similar)?

Thanks!



Christian Rengstl M.A.
Klinik und Poliklinik fÃr Innere Medizin II
Kardiologie - Forschung
UniversitÃtsklinikum Regensburg
B3 1.388
Franz-Josef-Strauss-Allee 11
93053 Regensburg
Tel.: +49-941-944-7230

--
 [ signature omitted ] 

Message 2 in thread

Qt is a very powerful tool, but it cannot do everything. 
And it is no postscript renderer. Perhaps you can start an 
external process, which transforms your EPS file into a 
supported image format? 

Cumbersome, but probably the only way.

Guido



On Fri, Mar 23, 2007 at 08:00:47AM +0100, Christian Rengstl wrote:
> Hi list,
> 
> does anybody know a way of displaying eps files using QImage (or
> anything similar)?
> 
> Thanks!
> 
> 
> 
> Christian Rengstl M.A.
> Klinik und Poliklinik für Innere Medizin II
> Kardiologie - Forschung
> Universitätsklinikum Regensburg
> B3 1.388
> Franz-Josef-Strauss-Allee 11
> 93053 Regensburg
> Tel.: +49-941-944-7230
> 
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/

--
 [ signature omitted ] 

Message 3 in thread

Guido Seifert schrieb:
> ... 
> And it is no postscript renderer. Perhaps you can start an 
> external process, which transforms your EPS file into a 
> supported image format? 
> ...
Qt supports SVG, so this could be an alternative format (in case you
manage to convert the EPS to SVG).

However Qt can be extended with "image plugins". Either write your own
or if you are lucky you might find a plugin which does already convert
EPS to a displayable QImage (which would then be pixel-based, off
course(*)). For example there exist Qt Tiff plugins, search the web.

See
http://doc.trolltech.com/4.2/plugins-howto.html#the-higher-level-api-writing-qt-extensions

Cheers, Oliver

(*) Or you could look at how the SVG renderer is implemented in Qt and
write your own EPS renderer - but I expect this is much more work than
simply writing a "Qt image plugin" which converts vector graphics to
bitmaps (given the  desired pixmap resolution).

And what's more there's probably no (easy) way to implement such an
extension as "Qt plugin", since the QImageIOPlugin API is probably too
simple. You would have to implement something like the following API:

  http://doc.trolltech.com/4.2/qsvgrenderer.html

--
 [ signature omitted ] 

Message 4 in thread

Thanks for your unfortunately not as pleasant answers as i had hoped for
:-) Anyway i decided to use Magick++ or even ImageMagick binaries for
converting from and to eps files.


Christian Rengstl M.A.
Klinik und Poliklinik fÃr Innere Medizin II
Kardiologie - Forschung
UniversitÃtsklinikum Regensburg
B3 1.388
Franz-Josef-Strauss-Allee 11
93053 Regensburg
Tel.: +49-941-944-7230


>>> On Mon, Mar 26, 2007 at 10:51 AM, in message
<4607898E.10204@xxxxxxxxxxx>, Till
Oliver Knoll <oliver.knoll@xxxxxxxxxxx> wrote: 
> Guido Seifert schrieb:
>> ... 
>> And it is no postscript renderer. Perhaps you can start an 
>> external process, which transforms your EPS file into a 
>> supported image format? 
>> ...
> Qt supports SVG, so this could be an alternative format (in case you
> manage to convert the EPS to SVG).
> 
> However Qt can be extended with "image plugins". Either write your
own
> or if you are lucky you might find a plugin which does already
convert
> EPS to a displayable QImage (which would then be pixel- based, off
> course(*)). For example there exist Qt Tiff plugins, search the web.
> 
> See
> http://doc.trolltech.com/4.2/plugins- howto.html#the- higher- level-
api- writing- qt- ext
> ensions
> 
> Cheers, Oliver
> 
> (*) Or you could look at how the SVG renderer is implemented in Qt
and
> write your own EPS renderer -  but I expect this is much more work
than
> simply writing a "Qt image plugin" which converts vector graphics to
> bitmaps (given the  desired pixmap resolution).
> 
> And what's more there's probably no (easy) way to implement such an
> extension as "Qt plugin", since the QImageIOPlugin API is probably
too
> simple. You would have to implement something like the following
API:
> 
>   http://doc.trolltech.com/4.2/qsvgrenderer.html
> 
> --
> To unsubscribe -  send a mail to qt- interest- request@xxxxxxxxxxxxx
with 
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-
interest/

--
 [ signature omitted ] 

Message 5 in thread

Hi,

I develop an app with Qt422.
I use windows 2000 (same problem with windows xp)
when Ilinked using  release Qt lib I saw all icones (xpm; gif,png,jpeg...)
since I link the app with Qt422 debug lib, only 2 icones are shown (png 
format).


Is someone had same problem or saw some task or contrib about a such 
problkem using debug Qt lib?

thank for any info.
Best regards,
Veronique.

--
 [ signature omitted ] 

Message 6 in thread

Christian Rengstl schrieb:
> Thanks for your unfortunately not as pleasant answers as i had hoped for
> :-) Anyway i decided to use Magick++ or even ImageMagick binaries for
> converting from and to eps files.

If you merely want to display the EPS files as pixmaps you could even
write an Qt image plugin for EPS using the Magick++ library. The only
"hard work" would then be to convert the internal Magick image format
("pixel layout") to the QImage format.

In fact, using the Magick++ library you could write a Qt plugin (or
several plugins) which could read almost any image format :) I wonder if
this has not already been done? I assume that once you have done this
step for one format, it is easy to add the others.

The QImageIOHandler::ScaledSize option could come handy here: "A handler
that supports this option is expected to scale the image to the provided
size (a QSize), ...". And since EPS is scaleable by nature you would let
Magick++ convert the EPS to a pixmap of the given size (QSize).

Cheers, Oliver

--
 [ signature omitted ]