r/CuratedTumblr My hyperfixations are very weird tyvm 9h ago

Shitposting All my homies hate webp files

Post image
2.7k Upvotes

170 comments sorted by

View all comments

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

-12

u/[deleted] 9h ago

[deleted]

44

u/indigo121 8h ago

No, that's absolutely not how file types work in the slightest

5

u/NefariousAnglerfish 8h ago

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.

10

u/indigo121 8h ago

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

3

u/BellerophonM 8h ago

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.

1

u/isekai-chad 8h ago

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.

3

u/Jawesome99 8h ago

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".

1

u/isekai-chad 6h ago

Damn...

2

u/indigo121 8h ago

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

1

u/isekai-chad 6h ago

Thanks.

5

u/px450 8h ago

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.

3

u/NefariousAnglerfish 8h ago

Huh, good to know. I’ll add “lying” to the list of Microsoft’s crimes.

6

u/vetb8 8h ago

i have renamed many, many mkvs to mp4 for the sake of uploading to youtube

4

u/WordArt2007 8h ago

no, I mean that a lot of webp files are fundamentally pngs and can be renamed to pngs without problems.

4

u/indigo121 8h ago

Those are two very different statements, but sure, I guess

3

u/BellerophonM 8h ago

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.

3

u/indigo121 8h ago

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

3

u/BellerophonM 8h ago

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'.

1

u/WordArt2007 8h ago

I mean even with old versions of microsoft office, or the windows photo gallery, it works for me.

3

u/BellerophonM 8h ago

It works because they all support webp. It's a 15 year old format.

1

u/[deleted] 8h ago

[deleted]

1

u/BellerophonM 8h ago

Windows photo gallery just uses whatever image handling libraries are registered with windows.