基于MIDP2.0实现图片的缩放功能[5]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

            // vertical resampling of the temporary buffer (which has been
            // horizontally resampled)
            System.out.println("Vertical resampling...");
            for (int x = 0; x < destW; ++x)
            {
                for (int destY = 0; destY < destH; ++destY)
                {
                    count = 0;
                    a = 0;
                    r = 0;
                    b = 0;
                    g = 0; // initialize color blending vars
                    int srcY = (destY * ratioH) >> FP_SHIFT; // calculate
                                                             // beginning of
                                                             // sample
                    int srcY2 = ((destY + 1) * ratioH) >> FP_SHIFT; // calculate
                                                                    // end of
                                                                    // sample

本文关键:基于MIDP2.0实现图片的缩放功能
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top