PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, July 28, 2022

[FIXED] How I can use com.android.camera.action.CROP with unspecified output size?

 July 28, 2022     android, crop, image     No comments   

Issue

Usually com.android.camera.action.CROP will show device's crop action, I have tried but it require specified output size. Is there any simplest way to perform croping action without specified output size like IsseiAoki/SimpleCropView or steelkiwi/cropiwa?

Intent cropIntent = new Intent("com.android.camera.action.CROP");
cropIntent.setDataAndType(picUri, "image/*");
cropIntent.putExtra("crop", "true");
cropIntent.putExtra("outputX", 360);
cropIntent.putExtra("outputY", 360);
cropIntent.putExtra("return-data", true);
startActivityForResult(cropIntent, PIC_CROP);

Solution

Usually com.android.camera.action.CROP will show device's crop action

No. Frequently it will crash with an ActivityNotFoundException. Android does not have a CROP Intent, and many Android devices will not ship with a camera app, or any other app, offering com.android.camera.action.CROP. Beyond that, com.android.camera.action.CROP is undocumented, and so what extras are honored, and what those extras mean, will vary by activity.

Is there any simplest way to perform croping action without specified output size

Find and use an image-cropping library that offers the feature set that you desire. You appear to list two of them in your question.



Answered By - CommonsWare
Answer Checked By - Mary Flores (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing