Hello! I haven't seen another topic like this, so if something like this already exists, I apologise.
Recently, I was going to convert an external harddrive from a Windows format to EXT4, so I moved all the stuff off of it. When I did, for some reason, a good handful of my .png files (but not most of them) became text files for some reason, despite having the .png extension on the end still. I'm admittedly very confused. I even tried renaming several to something else and then back to .png, but that didn't fix it.
Is there a way to change their filetype to a png image again? is there a way to fix this?
Understandably. THis is one of the more unusual issues I've seen posted and have never seen this particular issue before.
I can think of three general causes to this; two of which are out in left field and highly unlikely. They involve a malicious actor using a binder and embedded conversion software discretely implanted on your computer (Extremely unlikely), Or the .png files themselves being a binder carrying extra code (possible, but not high on my list of likely).
The most likely cause is File Corruption, possibly due to bad sectors on the drive.
I think some metadata for files can confuse a transfer program but, that too, would be very unusual.
Has the original drive already been formatted?
This question is hard to answer given the limited information available. In my own experience, corrupted images are often considered 'lost" simply because trying to base64 decode and reconstruct the original image is too complex and time consuming. But....... I do not work in forensics.
ImageMagick is a powerful tool, though. You might simply test if it can perform a repair simply by using its conversion utility.
Ensure imagemagick is installed
sudo apt install imagemagick
Use the actual filename and the new file name you wish to name it to.
convert corruptedimage.png repairedimage.png
For example, let's say you have a corrupted image that was named "bigbird.png"
Just to clarify: you moved all your files from an NTFS-formatted drive to where? And did you see this issue before or after formatting to EXT4? Did you already have Zorin OS installed? Have you made any other copies?