choiboi / android-cropping-example Goto Github PK
View Code? Open in Web Editor NEWAndroid Image Cropping Example.
Android Image Cropping Example.
Hi,
I couldnt find your contact info therefore i am writing here. I want to change the shape and color of the template but i couldnt manage it so far. What i am trying to do is changing the template to full circle and if possible making the template transparent
So Can you help me about it please?
Best regards,
Sinans
I am trying to change my template with Circular Shape which not seems to be working with this code. If I am trying with templates provided in this project working fine.
Can you please help me to resolve this issue?
Comment made by one member:
when i resize your template (png) from (320,440) to (310,426)
and change final width and height to 310,426
code
ImageProcess.cropImage(mImg.getDrawingCache(true)
mTemplateImg.getDrawingCache(true), 310,426);
it's error. ==>java.lang.IllegalArgumentException: y must be >= 0
Hi In my case i have to place the image according to x, y postions so i have given x, y as left, top margins. so after applying the margin i am unable to rotate the image. can u please look into that
When the image is touched on the screen for the first time, image will be scaled to the left immediately.
I am trying to fix this bug but i dont know how, i am working with it for tha past few days, it is okey with porttrait but in landscape i am always having a error.
02-23 08:18:45.335: E/AndroidRuntime(30289): FATAL EXCEPTION: Thread-10
02-23 08:18:45.335: E/AndroidRuntime(30289): java.lang.IllegalArgumentException: y must be < bitmap.height()
02-23 08:18:45.335: E/AndroidRuntime(30289): at android.graphics.Bitmap.checkPixelAccess(Bitmap.java:797)
02-23 08:18:45.335: E/AndroidRuntime(30289): at android.graphics.Bitmap.getPixel(Bitmap.java:749)
02-23 08:18:45.335: E/AndroidRuntime(30289): at com.choiboi.imagecroppingexample.ImageProcess.cropImageVer2_1(ImageProcess.java:921)
02-23 08:18:45.335: E/AndroidRuntime(30289): at com.choiboi.imagecroppingexample.CropActivity$6.run(CropActivity.java:440)
02-23 08:18:45.335: E/AndroidRuntime(30289): at java.lang.Thread.run(Thread.java:1019)
02-23 08:18:47.425: E/WindowManager(30289): Activity com.choiboi.imagecroppingexample.CropActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@40532fc8 that was originally added here
02-23 08:18:47.425: E/WindowManager(30289): android.view.WindowLeaked: Activity com.choiboi.imagecroppingexample.CropActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@40532fc8 that was originally added here
02-23 08:18:47.425: E/WindowManager(30289): at android.view.ViewRoot.(ViewRoot.java:258)
02-23 08:18:47.425: E/WindowManager(30289): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
02-23 08:18:47.425: E/WindowManager(30289): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
02-23 08:18:47.425: E/WindowManager(30289): at android.view.Window$LocalWindowManager.addView(Window.java:424)
02-23 08:18:47.425: E/WindowManager(30289): at android.app.Dialog.show(Dialog.java:241)
02-23 08:18:47.425: E/WindowManager(30289): at com.choiboi.imagecroppingexample.CropActivity.onCropImageButton(CropActivity.java:411)
02-23 08:18:47.425: E/WindowManager(30289): at java.lang.reflect.Method.invokeNative(Native Method)
02-23 08:18:47.425: E/WindowManager(30289): at java.lang.reflect.Method.invoke(Method.java:507)
02-23 08:18:47.425: E/WindowManager(30289): at android.view.View$1.onClick(View.java:2139)
02-23 08:18:47.425: E/WindowManager(30289): at android.view.View.performClick(View.java:2485)
02-23 08:18:47.425: E/WindowManager(30289): at android.view.View$PerformClick.run(View.java:9080)
02-23 08:18:47.425: E/WindowManager(30289): at android.os.Handler.handleCallback(Handler.java:587)
02-23 08:18:47.425: E/WindowManager(30289): at android.os.Handler.dispatchMessage(Handler.java:92)
02-23 08:18:47.425: E/WindowManager(30289): at android.os.Looper.loop(Looper.java:123)
02-23 08:18:47.425: E/WindowManager(30289): at android.app.ActivityThread.main(ActivityThread.java:3683)
02-23 08:18:47.425: E/WindowManager(30289): at java.lang.reflect.Method.invokeNative(Native Method)
02-23 08:18:47.425: E/WindowManager(30289): at java.lang.reflect.Method.invoke(Method.java:507)
02-23 08:18:47.425: E/WindowManager(30289): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
02-23 08:18:47.425: E/WindowManager(30289): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
02-23 08:18:47.425: E/WindowManager(30289): at dalvik.system.NativeStart.main(Native Method)
I am trying to change my template with my image with rectangle box which not seems to be working with this code. If I am trying with templates provided in this project working fine.
Can you please help me to resolve this issue ?
Hi, i am using your lib , and it is working fine. but i want to fix the image cropping rectangle/oval with fix resolution 1980x1080?
for eg, suppose i have an image of 2555 x 3000 resolution and every time i click to crop BUTTON it will always gives me image with fix resolution of 1980x1080, otherwise I'll show user some king of alert ,, like please upload image with higher resolution.
how i can remove orange border from croped images ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.