[Kde-java] Compressed Icons in Java Apps created with juic
Lukas Molzberger
lukas.molzberger at gmx.de
Tue Aug 17 10:00:33 CEST 2004
Hello,
I have a small Problem with code that has been created by the juic compiler
and I have no idea how to get this sorted out. It would be nice if someone
could help me with that.
Basically, what I did is created a small dialog in QtDesigner and exported it
as a .ui file. The dialog contained a relatively large image and I guess that
is the reason why QtDesigner has compressed this image. Then I called juic to
get a java source file. However, when I run this file I get the following
message and the image is not shown in the dialog.
QImage: XPM pixels missing on image line 71
The message is created in the following routine.
private QPixmap uncompressPixmap(int size, byte [] data) {
QPixmap pix = null;
try {
ByteArrayInputStream bais = new ByteArrayInputStream(data);
InflaterInputStream iis = new InflaterInputStream(bais);
byte [] xpm = new byte [size];
iis.read(xpm, 0, size);
> pix = new QPixmap(xpm);
}
catch (IOException ioe) {
System.err.println(ioe.getMessage());
}
return pix;
}
The strange thing is that smaller images like icons that are not compressed
work perfectly.
Cheers,
Lukas
More information about the Kde-java
mailing list