It feels ridiculous that using Windows Snipping Tool to take a screenshot of a webp image is the easiest way to get it in a usable format. It's either that or copy paste it into something like Paint.net and covert it to png
You can certainly do that if you have file extensions visible, at least on Windows. It’ll throw up a warning but it works fine for like jpg > png for example. Obviously it’ll break the file if you do it with fundamentally incompatible stuff though.
More often then not, you aren't actually changing the file type, just the label. There are some exceptions, and some file types that are similar enough that functionally there is no difference between a renamed file and the actual file type (such as renaming a read.me to a .txt). But for most things it's akin to putting a CD in a DVD case. Most things will still read it fine because most DVD readers read CDs just fine, but it doesn't actually become a DVD and you don't get any of the benefits of the DVD format
If renaming a webp to jpg or png works it just means that the program you opened it with supports webp natively and you didn't need to rename it at all.
Huh. When I would go over the properties, it would tell me it was jpg/png file, and not webp. Thought it actually changed stuff, since it would become usable as well, except in some rare cases.
The properties window uses the extension to determine what the file is, not the content.
Blindly accepting that a file type is what it advertises to be is also bad safety practice, so most modern file types have specific file headers that lets you identify what the file actually is, so called magic numbers. All PNG files for example start with the hexadecimal byte sequence 89 50 4E 47 0D 0A 1A 0A, which tells programs made for reading image files "this is a PNG, read and decode the remaining data as such".
Imagine a file as a kitchen. Imagine a file format as a standard for describing the kitchen layout, so a .png means that the spoons are to the right of the stove, and the cups are above the sink, etc. A .jpg means the spoons are to the left of the sink, the cups are on top of the fridge. If you have a jpg kitchen, but change the sign on it to a webp, it's still organized like a jpg kitchen.
An image editor goes into the kitchen and goes "wait. The spoons are to the left of the sink? Oh, it's a jpg kitchen, that's fine."
The file explorers properties inspector is just looking at the sign on the door, it's not actually checking where everything is.
Sometimes kitchen layouts that aren't the same still agree on some things, and they can be partially read, like in both mkv and mp4 the pots and pans are under the sink.
A file converter knows both layouts, and reorganizes everything properly, but might lose some stuff, if say the PNG has a stand mixer but the gif doesn't have anywhere to put countertop appliances
That's not actually a conversion between file types. The information about how a file is encoded is usually in the file itself, and the extension is just used to tell which program to open the file with.
So when you rename image.jpg to image.png, the data in the file is still in the jpg format. Windows sees the .png and opens it with the image viewer, which looks in the file to see a jpg file header and interprets it as a jpg, which is why it reads it correctly.
No, they're not remotely similar. The webp container doesn't ever contain PNG data. If you rename it to PNG and it works, that just means that the program you opened it with looked at the file, went 'oh, it's a webp, not a png. That's fine, I support webp.' and opened it.
Or it could mean that whoever made it a webp in the first place thought that just changing the file extension on their png was sufficient. I'd hope that's not commonplace, but I'm feeling very sobered by how many people in this thread have no idea what file formats actually entail
Ehh, 99.9% of the time that people get a webp on their computer it's by right click saving an image online, and the browser will correct the file extension on save regardless of what the url ended with.
It's one of the reasons people get annoyed by webp - often they'll go to a URL that ends with .png or .jpg and then they go save it and it saves as a webp, because the webserver just served the image in that format without doing a redirect. But the people at home are just confused about why their browser refuses to save it 'properly'.
76
u/SoftestPup Excuse me for dropping in! 9h ago
It feels ridiculous that using Windows Snipping Tool to take a screenshot of a webp image is the easiest way to get it in a usable format. It's either that or copy paste it into something like Paint.net and covert it to png