How do I add a large frame around image(s) ?

Croping an image is not an easy task. But, sometimes the task will takes far too many hours to achieve.

I have an example below to show you my problem.

Image 1: the image to crop “text” (title) from

Image 2: a “fast” crop, but without a black surrounding “line” (in fact, usually, 8 pixels or more).

There are times the surrounding black border exists, but not in the whole “text” (title).

Croping the image using Paint tools (the eraser for example) will take forever.

Computers are here to do this kind of job.

Question #1: is there in Gimp a function that allows that ?

Question #2: can you help me to create this function in Xojo ?

PS: I do not have only a small amount of images to do, but many, many / a concerted effort can benefit to all.


Use .DrawRect to draw a rect around an image. Have a look at this older library which has lots of helper functions for drawing. For instance, it has a crop.

I will do.

In the mean time, I took the example at RGBSurface, drop a large solid Appme (?), report the scan into a Listbox (Color as Red, Green, Blue and X,Y in the next column), then… nothing. The blank !

More ideas later (after the reading ?).

Thanks Beatrix.