How to get rid of scale bar that is on the tif or jpg image?

I have many images that have their scale bars on them. Scale bars are not added by imagej and they are added by microscopy software that is not available now.
Is the any way to get rid of those scale bars? Preferably a code that can do it.

If the image type is TIF or JPG then there is nothing you can do to remove it. You can only crop the image to cut off the part with a scale bar.