On 28.04.06 17:40:01, David Boddie wrote:
> On Friday 28 April 2006 16:58, Andreas Pakulat wrote:
> > For those that don't want to install python just for this I attach a
> > Qt+STL-only program that extracts all images from a given ui-file.
> I forgot to mention that my prototype code only handles images in the
> "XPM.GZ" format. Some .ui files may contain images in other formats;
> obviously, these can't be handled in the same way.
I know ;-)
> The only problem with your code is that it assumes that the images are
> are actually in XPM.GZ format. The truth is a bit more complicated than
No it doesn't, actually it only fetches the data, converts it into
char's and puts it into a file. This worked for png-type images. I have
no XPM or XPM.gz at hand to test these, but it should work there too.
> Basically, the data can be uncompressed with qUncompress() - it just needs
> the length information prepending to the byte array. Once uncompressed, the
> images can be written to disk as normal .xpm files.
So writing out the "raw" data to an xpm.gz produces a broken gzip file?
If not I don't see any need for qUncompress to be used.
Your love life will be... interesting.
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/