Code Monkey home page Code Monkey logo

android-cropimage's Introduction

Android CropImage

The CropImage activity extracted from Gallery.apk. Compatible with Android 2.3 and later versions.

Looking for a New Maintainer

Due to time constraints and the fact that I'm not personally using this library at the moment, I am looking for people willing to co-maintain this project. If interested drop me a line by sending an email to [email protected].

Intent-based API

The CropImage activity is controlled by an Intent-based API. Please use the wrapper class com.android.camera.CropImageIntentBuilder for a type-safe interface.

Android 4 Notes

If your application targets Android 4 (API Level 14 and later) then it will use hardware acceleration by default. There's a bug in the CropImage activity which may trigger a Force Close error when hardware acceleration is enabled.

To work-around this bug you have to disable hardware acceleration for the CropImage activity by adding an entry like this in your AndroidManifest.xml:

<activity
    android:name="com.android.camera.CropImage"
    android:hardwareAccelerated="false"/>

Details

On Android 4.0.0 and later, when hardware acceleration is enabled, the CropImage activity throws an unmanaged exception. The sources were imported from Android 2.1 and it is possible for some graphics operation to raise errors on newer platforms.

Stacktrace follows:

java.lang.UnsupportedOperationException
	at android.view.GLES20Canvas.clipPath(GLES20Canvas.java:413)
	at com.android.camera.HighlightView.draw(HighlightView.java:101)
	at com.android.camera.CropImageView.onDraw(CropImage.java:783)
	at android.view.View.draw(View.java:10978)
	at android.view.View.getDisplayList(View.java:10417)
	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597)
	at android.view.View.getDisplayList(View.java:10380)
	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597)
	at android.view.View.getDisplayList(View.java:10380)
	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597)
	at android.view.View.getDisplayList(View.java:10380)
	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597)
	at android.view.View.getDisplayList(View.java:10380)
	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597)
	at android.view.View.getDisplayList(View.java:10380)
	at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:842)
	at android.view.ViewRootImpl.draw(ViewRootImpl.java:1910)
	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1634)
	at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2442)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:137)
	at android.app.ActivityThread.main(ActivityThread.java:4424)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:511)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
	at dalvik.system.NativeStart.main(Native Method)

Project Information

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.