The Porter-Duff Experiment

Awesome :upside_down_face:

I don't understand this error
image

I clearly have the component right here....
image

Looks like you are using ios.

ios cannot use extensions, at this time.

1 Like

dang

How do you get those "get filename" blocks? Sorry I'm new and was wondering where those blocks came from along with what seems to be a procedure block with that "filename" option beside it

Use a procedure block, and then use the mutator block (small blue square) to add an argument to the procedure (which you can name as you want)

https://ai2.appinventor.mit.edu/reference/blocks/procedures.html

pls help me i get an error like this every single time " Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference
Note: You will not see another error reported for 5 seconds."

Please show your relevant blocks, or share your aia project.

i deleted them and tried a new way. I didn't have the the time 'cause my projects deadline is tomorrow

Not working not making the logo circular




I am uploading it my internet got broken in between.

Aia :
ProfilePicture.aia (121.2 KB)

Again, provide an aia project, and your images, that demonstrates this behaviour.

Edited above

Where is the image you want to transform ?

I want to store circular image of any image in the firebase please suggest anyother way if this won't worked.

From the first post above

image

I took pity, and have created an aia project that demonstrated the workflow required to use the PorterDuff extension to make a circular image from any image of any aspect ratio. I also use my ImageConvertor extension. It will make the circle from the centre of all images. I have set the output image size (and mask) to 256x256 pixels, and these must be png images to maintain the transparency. You should be able to supply the blocks with any image, but you will need to convert contenturis to filepaths if using the filePicker component (just use the imagePicker or activityStarter).

circularImageWorkflowFinal.aia (467.4 KB)

2 Likes

What is the method for image a it is in the circle, minimum crop to the circle?

Sorry, do not understand?

Means same ratio of the image will be circled, but not more than the minimum dimensions from the circle.

You might need to show this with pictures or drawing...