[Kde-java] Compressed Icons in Java Apps created with juic

Richard Dale Richard_Dale at tipitina.demon.co.uk
Wed Aug 18 11:55:13 CEST 2004


On Tuesday 17 August 2004 09:00, Lukas Molzberger wrote:
> 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.
Could you post the .ui file to make it easier to test out the problem?

-- Richard


More information about the Kde-java mailing list