Image crop into 9 pics

Yes peter i saw thap post but m still confused

In that extension images croped according to size of image not by 1x1 ratio

And i also got another way to do it by crop image according to size like if 33 then crop image in 11 then use image extension in pura vida apps but image doesnot crop in proper way

Can you sugest me any extension to crop images ?
It will be beter if it will me With preview

Cropping is the removal of unwanted outer areas from a photographic or illustrated image. What you are trying to do is making 9 images from one.

Why didn’t you tell what you already had done? If it is not on the extension page it is not there. Maybe ask Taifun if he can make what you want. You can sponsor him.

I think this block of @Taifun’s extension does what you want. Have you tried?


Create chunks of a jpg image file.

For example rows=4 and columns=3 will create 12 chunks of the original image, see screenshot

The chunks will be stored in the same directory as the original image file. The following name convention will be used: imageFileName_rowNumber_columnNumber.jpg.

You can use a relative path or a complete path to the image file. To use a relative path, just prefix the imageFileName with /. For instance /myFile.jpg will create chunks of the file /mnt/sdcard/myFile.jpg. You can’t create chunks from files in the assets. If a fileName starts with file:/// you can specify a complete path to the file.

Source: App Inventor Extensions: Image | Pura Vida Apps

6 Likes

which means, your questions is about how to crop an image into a square and then create chunks, so each of the chunks is again a square?
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.
Also you might want to explain, what exactly you are trying to do, what was the result or your trial and what did you want to get instead…

in the image extension there are 2 methods to crop an image

  1. the Crop method and
  2. the Scale method

protip: read the documentation and try the example projects there…

also there are other image extensions available, which offer a Crop method, you can find the extensions directory here App Inventor Extensions | Pura Vida Apps

Taifun

1 Like

I think the user is trying to do the same as several applications: 9Grid for Instagram

hello guys is there any extension to crop images with custom size ?

i check many extensions on pura vida extensions bt there all extensions crop images in square pic not in portrait or landscape or custome size

my problem will solve with answer of this question

yes, the Crop method from here App Inventor Extensions: Image | Pura Vida Apps is able to crop any size

crop
Crop Image. Enter the distance in pixel for left, top, right and bottom.

Taifun
PS: you forgot to answer my previous questions…

hello sir
i m trying to do same thing as Image crop into 9 pics in this app here we can make posta like in this pic


and if pic is not square then i cant make pics like this
and if i want to make it more longer like 18 chunks
then i have to crop image according to each square chunk

means the chunks must be square neither portrait nor landscape

and thats why i want a image crop extension by which i can crop image according to final chunks

so what prevents you from doing it?
just use some math to calculate, how the original image needs to be cropped, so you get nice chunks in square format in the end…

Taifun

I got Solution of my last question by using your image extension and some calculations

than you

and i have also one more problem i want to make app like no crop
i create one black n another white image for background and i cant get any way to merge the image on background images

i also tried with image editor component but in that i can only join two images like right and left not one on another

apart from that is there any extension to crop image according to resolution with crop preview ?

let’s assume, you like to add a black border on the left and right side of your image…

  1. join the black image and your image
  2. join the result of 1) and again the black image
  3. crop the image to square size

Taifun

1 Like

great idea

but what if the image is landscape ?

thank you

and is there any extension to crop image according to resolution with preview

be creative…
for example rotate the landscape picture by 90 degrees, then follow the steps

  1. join the black image and your image
  2. join the result of 1) and again the black image
  3. crop the image to square size

and rotate it back 90 degrees

I don’t understand completely what you are asking…you might want to try the Scale method from the image extension…
also the extensions directory is here App Inventor Extensions | Pura Vida Apps

Taifun

A post was split to a new topic: Invoke: no method name “Rotate” in class com.puravidaapps.TaifunImage

hello @Taifun the image is not clear after finishing the process

The picture Before process

The picrure after process

sorry, but unfortunately I do not have a suggestion for you to get a better quality
Taifun

i got solution for that problem thank you @Taifun

you might want to reveal your solution here in this thread then
thank you
Taifun

ya sure

we just have to check on high quality images in advance properties

But It also slow down the app

Untitled

1 Like