我想问的是怎么实现,一个图片上面出现那种伸缩框来确定裁剪区域,并可以对伸缩框进行伸缩,并把裁剪的区域保存下来

解决方案 »

  1.   

    Bitmap类里面有相应的方法
    createBitmap(int colors[], int offset, int stride,
                 int width, int height, Config config)
      

  2.   

    那个显然要自己实现,可以创建一个view
    然后获得图片的位置,然后再用一个可以拉动的矩形,然后比对图片的位置来获取
      

  3.   

    楼主你看看我之前写的这篇文章 希望可以帮到你喔 。。
    http://blog.csdn.net/xys289187120/article/details/6575830
      

  4.   

    在这之前我已经解决了,就是调用系统的方法处理,
    对了,我还想问问那个,图片的一些特效,诸如什么古典啊,lemo啊,复古啊,什么的,怎么实现啊
      

  5.   

    恭喜LZ,解决了就好。对了裁剪好像可以用才clipRect吧!呵呵
      

  6.   

    看源码吧,我觉得是用Ondraw()画的。。
      

  7.   

    做个总结吧,既然没人能解决,我上网看了下,
    裁剪Intent intents = new Intent("com.android.camera.action.CROP");调用相机的裁剪功能,
    特效啊什么的,现在在探索之中,然后图片合成是要用到paint的一个方法paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.MULTIPLY));  
    差不多就这样吧
      

  8.   

    我使用Intent intents = new Intent("com.android.camera.action.CROP");时老是出问题,求指导、、
      

  9.   

    关于android 图片特效的案例  
    http://blog.csdn.net/maylian7700?viewmode=contents
    希望可以帮到你。。
      

  10.   

    出现无法找到Activity的android.content.ActivityNotFoundException异常,
    这是由于Android内部的gallery和camera都有处理,可以尝试另一种URI,com.android.gallery的com.android.camera.CropImage,在setClassName时,具体的代码为 
    final Intent intent = new Intent("com.android.camera.action.CROP"); 
    intent.setClassName("com.android.camera", "com.android.camera.CropImage"); 
    intent.setData(Uri.fromFile(mFile)); 
    intent.putExtra("outputX", width); 
    intent.putExtra("outputY", height); 
    intent.putExtra("aspectX", width); 
    intent.putExtra("aspectY", height); 
    intent.putExtra("scale", true); 
    intent.putExtra("noFaceDetection", true); 
    intent.putExtra("output", Uri.parse("file:/" + mFile.getAbsolutePath())); 
    startActivityForResult(intent, REQUEST_CROP_IMAGE); 
      

  11.   

    上个回答错了,给16楼了,眼花 O(∩_∩)O~
    出现无法找到Activity的android.content.ActivityNotFoundException异常,
    这是由于Android内部的gallery和camera都有处理,可以尝试另一种URI,com.android.gallery的com.android.camera.CropImage,在setClassName时,具体的代码为 
    final Intent intent = new Intent("com.android.camera.action.CROP"); 
    intent.setClassName("com.android.camera", "com.android.camera.CropImage"); 
    intent.setData(Uri.fromFile(mFile)); 
    intent.putExtra("outputX", width); 
    intent.putExtra("outputY", height); 
    intent.putExtra("aspectX", width); 
    intent.putExtra("aspectY", height); 
    intent.putExtra("scale", true); 
    intent.putExtra("noFaceDetection", true); 
    intent.putExtra("output", Uri.parse("file:/" + mFile.getAbsolutePath())); 
    startActivityForResult(intent, REQUEST_CROP_IMAGE);