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

Qt-interest Archive, April 2007
[4.2.2] Composing multiple images


Message 1 in thread

Hi there,

I've got a list of images which I'd like to 'compose' in a single big
one like this:

- - - - - - - - - - - - -
| Img | Img | Img | Img |
- - - - - - - - - - - - -

Is there a simple way of doing that? I can't find any convenience
methods ...


Thanks in advance,
r.

--------------------------------------------------------------------
  Rene Kaiser
  Institute of Information Systems & Information Management
  JOANNEUM RESEARCH Forschungsgesellschaft mbH
  Steyrergasse 17, A-8010 Graz, AUSTRIA

  phone:  +43-316-876-1173                   fax: +43-316-876-1191
  web:    http://www.joanneum.at/iis
  e-mail: mailto:rene.kaiser@xxxxxxxxxxx
-------------------------------------------------------------------- 

--
 [ signature omitted ] 

Message 2 in thread

Rene,

You can put a bunch of QLabels in a tight grid layout (set spacing to 0) 
and then setPixmap() on each of the labels.

--Justin

Kaiser, Rene wrote:
> Hi there,
>
> I've got a list of images which I'd like to 'compose' in a single big
> one like this:
>
> - - - - - - - - - - - - -
> | Img | Img | Img | Img |
> - - - - - - - - - - - - -
>
> Is there a simple way of doing that? I can't find any convenience
> methods ...
>
>
> Thanks in advance,
> r.
>
> --------------------------------------------------------------------
>   Rene Kaiser
>   Institute of Information Systems & Information Management
>   JOANNEUM RESEARCH Forschungsgesellschaft mbH
>   Steyrergasse 17, A-8010 Graz, AUSTRIA
>
>   phone:  +43-316-876-1173                   fax: +43-316-876-1191
>   web:    http://www.joanneum.at/iis
>   e-mail: mailto:rene.kaiser@xxxxxxxxxxx
> -------------------------------------------------------------------- 
>
> --
> 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/
>
>   

begin:vcard
begin:vcard
fn:Justin Noel
n:Noel;Justin
org:ICS;Engineering
adr:;;54B Middlesex Trpk;Bedford;MA;01730;USA
email;internet:justin@xxxxxxx
title:Sr. Consulting Engineer / Certified Qt Instructor
tel;work:(617) 621-0060
url:http://www.ics.com
version:2.1
end:vcard


Message 3 in thread


What I need to do is to generate one image (QPixmap, QImage, ... whatever) and save it as a file.
Any other hints?

Thanks anyway,
r.
 

-----Ursprüngliche Nachricht-----
Von: Justin Noel [mailto:justin@xxxxxxx] 
Gesendet: Mittwoch, 11. April 2007 00:31
An: qt-interest@xxxxxxxxxxxxx
Betreff: Re: [4.2.2] Composing multiple images

Rene,

You can put a bunch of QLabels in a tight grid layout (set spacing to 0) and then setPixmap() on each of the labels.

--Justin

Kaiser, Rene wrote:
> Hi there,
>
> I've got a list of images which I'd like to 'compose' in a single big 
> one like this:
>
> - - - - - - - - - - - - -
> | Img | Img | Img | Img |
> - - - - - - - - - - - - -
>
> Is there a simple way of doing that? I can't find any convenience 
> methods ...
>
>
> Thanks in advance,
> r.
>
> --------------------------------------------------------------------
>   Rene Kaiser
>   Institute of Information Systems & Information Management
>   JOANNEUM RESEARCH Forschungsgesellschaft mbH
>   Steyrergasse 17, A-8010 Graz, AUSTRIA
>
>   phone:  +43-316-876-1173                   fax: +43-316-876-1191
>   web:    http://www.joanneum.at/iis
>   e-mail: mailto:rene.kaiser@xxxxxxxxxxx
> --------------------------------------------------------------------
>
> --
> 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 4 in thread

Pretty straight forward,  Create a new QPixmap of the correct size (add the widths, set the height)

Create a painter, with the pixmap as the device.  

Draw a transparent background, then draw each pixmap in the correct location.

Scott

> -----Original Message-----
> From: Kaiser, Rene [mailto:Rene.Kaiser@xxxxxxxxxxx]
> Sent: Tuesday, April 10, 2007 11:50 PM
> To: qt-interest@xxxxxxxxxxxxx
> Subject: AW: [4.2.2] Composing multiple images
> 
> 
> 
> What I need to do is to generate one image (QPixmap, QImage, ... whatever)
> and save it as a file.
> Any other hints?
> 
> Thanks anyway,
> r.
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Justin Noel [mailto:justin@xxxxxxx]
> Gesendet: Mittwoch, 11. April 2007 00:31
> An: qt-interest@xxxxxxxxxxxxx
> Betreff: Re: [4.2.2] Composing multiple images
> 
> Rene,
> 
> You can put a bunch of QLabels in a tight grid layout (set spacing to 0)
> and then setPixmap() on each of the labels.
> 
> --Justin
> 
> Kaiser, Rene wrote:
> > Hi there,
> >
> > I've got a list of images which I'd like to 'compose' in a single big
> > one like this:
> >
> > - - - - - - - - - - - - -
> > | Img | Img | Img | Img |
> > - - - - - - - - - - - - -
> >
> > Is there a simple way of doing that? I can't find any convenience
> > methods ...
> >
> >
> > Thanks in advance,
> > r.
> >
> > --------------------------------------------------------------------
> >   Rene Kaiser
> >   Institute of Information Systems & Information Management
> >   JOANNEUM RESEARCH Forschungsgesellschaft mbH
> >   Steyrergasse 17, A-8010 Graz, AUSTRIA
> >
> >   phone:  +43-316-876-1173                   fax: +43-316-876-1191
> >   web:    http://www.joanneum.at/iis
> >   e-mail: mailto:rene.kaiser@xxxxxxxxxxx
> > --------------------------------------------------------------------
> >
> > --
> > 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/
> >
> >
> 
> --
> 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

	
Thank you!
I didn't notice that QPixmap is a QPaintDevice : )


Regards,
r. 

-----Ursprüngliche Nachricht-----
Von: Scott Aron Bloom [mailto:scott@xxxxxxxxxxxx] 
Gesendet: Mittwoch, 11. April 2007 09:50
An: Kaiser, Rene; qt-interest@xxxxxxxxxxxxx
Betreff: RE: [4.2.2] Composing multiple images

Pretty straight forward,  Create a new QPixmap of the correct size (add the widths, set the height)

Create a painter, with the pixmap as the device.  

Draw a transparent background, then draw each pixmap in the correct location.

Scott

> -----Original Message-----
> From: Kaiser, Rene [mailto:Rene.Kaiser@xxxxxxxxxxx]
> Sent: Tuesday, April 10, 2007 11:50 PM
> To: qt-interest@xxxxxxxxxxxxx
> Subject: AW: [4.2.2] Composing multiple images
> 
> 
> 
> What I need to do is to generate one image (QPixmap, QImage, ... 
> whatever) and save it as a file.
> Any other hints?
> 
> Thanks anyway,
> r.
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Justin Noel [mailto:justin@xxxxxxx]
> Gesendet: Mittwoch, 11. April 2007 00:31
> An: qt-interest@xxxxxxxxxxxxx
> Betreff: Re: [4.2.2] Composing multiple images
> 
> Rene,
> 
> You can put a bunch of QLabels in a tight grid layout (set spacing to 
> 0) and then setPixmap() on each of the labels.
> 
> --Justin
> 
> Kaiser, Rene wrote:
> > Hi there,
> >
> > I've got a list of images which I'd like to 'compose' in a single 
> > big one like this:
> >
> > - - - - - - - - - - - - -
> > | Img | Img | Img | Img |
> > - - - - - - - - - - - - -
> >
> > Is there a simple way of doing that? I can't find any convenience 
> > methods ...
> >
> >
> > Thanks in advance,
> > r.
> >
> > --------------------------------------------------------------------
> >   Rene Kaiser
> >   Institute of Information Systems & Information Management
> >   JOANNEUM RESEARCH Forschungsgesellschaft mbH
> >   Steyrergasse 17, A-8010 Graz, AUSTRIA
> >
> >   phone:  +43-316-876-1173                   fax: +43-316-876-1191
> >   web:    http://www.joanneum.at/iis
> >   e-mail: mailto:rene.kaiser@xxxxxxxxxxx
> > --------------------------------------------------------------------
> >
> > --
> > 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/
> >
> >
> 
> --
> 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 6 in thread

No problem... We have all been there... :)  BTW, don't forget the transparent background fill on the image... Otherwise if your images that your painting have any transparent areas, they will show garbage...

QPixmap pm( w, h );
pm.fill( Qt::transparent )
QPainter painter( &pm )
...




> -----Original Message-----
> From: Kaiser, Rene [mailto:Rene.Kaiser@xxxxxxxxxxx]
> Sent: Wednesday, April 11, 2007 1:41 AM
> To: qt-interest@xxxxxxxxxxxxx
> Subject: AW: [4.2.2] Composing multiple images
> 
> 
> Thank you!
> I didn't notice that QPixmap is a QPaintDevice : )
> 
> 
> Regards,
> r.
> 
> -----Ursprüngliche Nachricht-----
> Von: Scott Aron Bloom [mailto:scott@xxxxxxxxxxxx]
> Gesendet: Mittwoch, 11. April 2007 09:50
> An: Kaiser, Rene; qt-interest@xxxxxxxxxxxxx
> Betreff: RE: [4.2.2] Composing multiple images
> 
> Pretty straight forward,  Create a new QPixmap of the correct size (add
> the widths, set the height)
> 
> Create a painter, with the pixmap as the device.
> 
> Draw a transparent background, then draw each pixmap in the correct
> location.
> 
> Scott
> 
> > -----Original Message-----
> > From: Kaiser, Rene [mailto:Rene.Kaiser@xxxxxxxxxxx]
> > Sent: Tuesday, April 10, 2007 11:50 PM
> > To: qt-interest@xxxxxxxxxxxxx
> > Subject: AW: [4.2.2] Composing multiple images
> >
> >
> >
> > What I need to do is to generate one image (QPixmap, QImage, ...
> > whatever) and save it as a file.
> > Any other hints?
> >
> > Thanks anyway,
> > r.
> >
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Justin Noel [mailto:justin@xxxxxxx]
> > Gesendet: Mittwoch, 11. April 2007 00:31
> > An: qt-interest@xxxxxxxxxxxxx
> > Betreff: Re: [4.2.2] Composing multiple images
> >
> > Rene,
> >
> > You can put a bunch of QLabels in a tight grid layout (set spacing to
> > 0) and then setPixmap() on each of the labels.
> >
> > --Justin
> >
> > Kaiser, Rene wrote:
> > > Hi there,
> > >
> > > I've got a list of images which I'd like to 'compose' in a single
> > > big one like this:
> > >
> > > - - - - - - - - - - - - -
> > > | Img | Img | Img | Img |
> > > - - - - - - - - - - - - -
> > >
> > > Is there a simple way of doing that? I can't find any convenience
> > > methods ...
> > >
> > >
> > > Thanks in advance,
> > > r.
> > >
> > > --------------------------------------------------------------------
> > >   Rene Kaiser
> > >   Institute of Information Systems & Information Management
> > >   JOANNEUM RESEARCH Forschungsgesellschaft mbH
> > >   Steyrergasse 17, A-8010 Graz, AUSTRIA
> > >
> > >   phone:  +43-316-876-1173                   fax: +43-316-876-1191
> > >   web:    http://www.joanneum.at/iis
> > >   e-mail: mailto:rene.kaiser@xxxxxxxxxxx
> > > --------------------------------------------------------------------
> > >
> > > --
> > > 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/
> > >
> > >
> >
> > --
> > 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/
> 
> --
> 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 ]