okay awesome, your one liner is great. im going to use that one instead but below is how i did it:
so i did it one by one since i dont know how to combine all commands just yet
// flood fill an image with fuzz (fuzz to blend more pixels in and out of selection)
convert chopped_off_top.jpg -fuzz 10% -draw "alpha 1,10 floodfill" flood-filled.jpg
// Create a threshold of crop_
convert flood-filled -threshold 6% threshold.jpg
// copy the threshold imaged (black and white image) to the alpha channel of crop_me.jpg
convert crop_me.jpg threshold.jpg -alpha Off -compose CopyOpacity -composite hopeful.png
i was able to successfully copy/combine the mask to the alpha channel of the original file.
now what i have to learn is how to create a bounding rectangle box and fill in those rectangles with white...
i tried to use the connected components method using the document you sent me
https://imagemagick.org/script/connected-components.php
but i get so many objects back
convert threshold.jpg -connected-components 4 -auto-level -depth 8 segmented.jpg
convert segmented.jpg -define connected-components:verbose=true -connected-components 4 componented.jpg
so i still have to figure out how to do it properly.. you said
That is why you must use some area-threshold smaller than the estimated area of the smallest pictures in the connected components to remove these regions so you do not get that message.
so im going to mess around with the area-threshold in connect-components to see what i get.
the other thing i have to figure out is the next steps.. I'm not sure if i first have to use connect-components to separate the areas where the images live, create a bounding box and then fill it with white ... or create a bounding box first around each image area, separate using connect-components and then fill in..
im also not sure how to create a rectanagle bounding box so thats what i have to figure out next too
hey thanks for help man. this is coming along great! thank you