Square crop method with the activity starter

Hi, I wanted to know if it is possible to create with the activity starter a method that allows you to crop perfect and fixed squares from an image chosen from the gallery.

yes it’s possible, See here:

I have already looked at this topic, but none of the methods used work (I have read every single post), so I have opened my topic in search of a real solution

What happens exactly?


I tried to use this method with the activity starter in 3 different types, however the crop area does not remain fixed, but can still be modeled and made a rectangle or a line.
I am looking for a method with the activity starter that cuts me a precise portion which, enlarged or not, always remains of that shape

You can use another methods for cropping like the crop method here:
https://puravidaapps.com/image.php
Or this block here:
https://docs.kodular.io/components/drawing-and-animation/image-editor/#scale-center-crop

I know these methods, they just cut the image by default after it has been chosen in the gallery.
This however prevents me from being able to choose where to cut, and how big or small for each individual image, so they are not suitable.

with the activity starter I can call the CROP method of the camera for each single image, but the shape does not remain fixed, and even inserting data such as ‘aspect’ or ‘output’ behaves as if they do not exist.

you can’t pass boolean or long values using the defaut activity starter


Taifun

1 Like

Hi Taifun, well, I’ll try to use XActivityStarter for call a crop method with specific settings (like output and aspect), but there’s a problem.


In this image I use in DataUri the Join block with “file://”, and the app, at the moment who choise the image, fall into the “intent.getData()” error.
Without the Join Block and “file://” string, appear the message “image editing is not supported”
This kind of problems are discuss in my previous topic, where I have used the “CropImage” extension, so please tell me: where am I wrong?

read the already mentioned thread completely to fix the errors in your blocks
Taifun

This post was flagged by the community and is temporarily hidden.

sometimes there is no simple solution to a problem…
sometimes someone needs to play around, try some things…
someone else already went through several steps and we got close to the solution in that other thread…
sorry, you will be the one to try things out… I will not do your work… it does not look like you even took a quick look at the other thread… else you could realize, that your blocks do not really make sense

good luck!

I now joined your duplicate thread… I recommend you to not start a new thread with the same subject again… see also the posting guidelines… you don’t want to be suspended from the community, do you?

Taifun

2 Likes

This post was flagged by the community and is temporarily hidden.

try this com.ammar5287.Cropimage.aix (8.6 KB)

Thank you SO MUCH for this extension, but with this blocks, the app fall into the “intent.getData()” error.

is correct to do this? or I make an error? what do you think about it?

use 1 in aspectheight and aspectwidth

Ok l do this


but the “intent.getData()” problem exist again.