Hello

I have JPG images with data stored at the end of them. My goal is to simply remove this data from the end of the file. The extra data is in plain text. The JPG images can still be viewed as normal with this data in them.

The plain text in the end of the file starts with the beginning mark of
"--------data---------", a line break, and then the data. Then there is
the end mark of the string
"-------enddata-------"

How can I remove all of this this data without destroying the file? Is there a way to do it without completely copying the file?