JSR234是高级媒体API,在原有的MMA的基础上增加了很多Control,目前nokia的s60第三版已经开始支持jsr234,他主要支持对图片、声音等多媒体信息的一些高级处理,下面是使用其对图片缩放的方法:

 
/** *//**
     * 实现对图片的缩放
     * @param path String 缩放图片的路径
     * @param newWidth int 新的宽度
     * @param newHeight int 新的高度
     * @return Image 缩放以后得到的Image对象
     */
    public Image zoomImage(String path,int newWidth,int newHeight)...{
        Image re = null;
        MediaProcessor mp = null;
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        try ...{
            mp = GlobalManager.createMediaProcessor("image/png");
            InputStream in = this.getClass().getResourceAsStream(path);
            mp.setInput(in,MediaProcessor.UNKNOWN);
            mp.setOutput(baos);
            ImageTransformControl itc = (ImageTransformControl)mp.getControl("javax.microedition.amms.control.imageeffect.ImageTransformControl");
            int sw = itc.getSourceWidth();
            int sh = itc.getSourceHeight();
            int ow = newWidth;
            int oh = newHeight;
            itc.setSourceRect(0,0,sw,sh);
            itc.setTargetSize(ow,oh,0);
            itc.setEnabled(true);
            mp.start();
            mp.complete();
            byte b[] = baos.toByteArray();
            System.out.println(b.length);
            int[] ints = new int[b.length / 4];
            int intcount, bytecount;
            for (intcount = 0, bytecount = 0; bytecount < b.length; ) ...{
                ints[intcount] =
                    (( ((int)(b[bytecount + 0])) << 24) & 0xFF000000) |  //A
                    (( ((int)(b[bytecount + 1])) << 16) & 0x00FF0000) |  //R
                    (( ((int)(b[bytecount + 2])) << 8)  & 0x0000FF00) |  //G
                    (( ((int)(b[bytecount + 3]))        & 0x000000FF) ); //B
                intcount++;
                bytecount+=4;
            }

            re = Image.createRGBImage(
            ints, ow, oh, true);
           
        } catch (MediaException ex) ...{
            ex.printStackTrace();
        }

        return re;
    }
在J2ME中可以直接使用这个方法,当然,先确定你的手机支持jsr234,缩放只是对图片处理的一个很小的方面,有兴趣的可以看看WTK2.5中关于JSR234的DEMO