tdscanuck t1_ixta9ey wrote
The file extension just tells the OS what program to use to open the file. The program that tries to open it is going to actually look at the file to see what it is.
In virtually all cases, any program that can open webp or jfif also knows how to open gif or jpeg, so when they open the file they just go "Oh, this is a jfif" and keep doing their thing.
Luthemplaer OP t1_ixtafjy wrote
Why can't photoshop open a jfif or webp but if I rename it it can?
Practical_Cartoonist t1_ixtfiaz wrote
Upgrade to Photoshop 2021 (v22) or Photoshop 2022 (v23). What you're describing is a known bug in older versions of Photoshop. Photoshop 2020 and Photoshop 2019 had a bug where they could only open .jfif files if they were incorrectly renamed as .jpg.
tdscanuck t1_ixtb0z3 wrote
Do you mean if you open Photoshop then tell it to open a jfif file, it can't? I have no idea.
If you mean, "Why doesn't Photoshop open when I doubleclick the jfif file?" then that's nothign to do with Photoshop...that's your OS not knowing to open Photoshop when you try to open a jfif file.
Nemesis_Ghost t1_ixts3tj wrote
They can.
If you are talking about double-clicking the file in a folder you have to set that up in your OS. In Windows you can right click & do "Open With" and select your preferred app. In the Open With menu you can pick "Choose another app" & then there's a check box "Always use this app to open...". Check that check box & pick your app, then next time you double click that file type it'll open with that app.
If you are trying to use the Open File dialog box, you can change the extension(s) it's looking for. You can manually type in *. followed by the extension. So for jfifs, you'd type in "*.jfif". Or most times there's a drop down next to where you can type in the file name & you can pick a file type or set of types.
ScandInBei t1_ixtoaoo wrote
The sw has to explicitly decide (and a programmer implement it) to check the file if it's a renamed file.
The simpler way is to try to open the file and decode it according to the file format and if it fails show an error message.
So it Photoshop could do it, but someone has to program it and it would cost money to do it.
donal23 t1_ixtqwfc wrote
In any software that's written, never should a file be tried to open based on extension alone. Because that would mean that renaming an executable to an .jpg and having someone open it in said software, executes the file.
So Photoshop already does the actual checking of a file by its contents. What might be happening is that it already rejects the file based on extension however. But the second part is definitely already there.
ScandInBei t1_ixtvd1j wrote
> Because that would mean that renaming an executable to an .jpg and having someone open it in said software, executes the file.
What? That's just wrong. That's not at all how software works.
JaggedMetalOs t1_ixtyswp wrote
> Because that would mean that renaming an executable to an .jpg and having someone open it in said software, executes the file.
This couldn't happen, an exe file can't just run when loaded by a piece of software it would have to be explicitly interpreted as an executable program which Windows does to files named .exe but which some random image viewer wouldn't if you renamed it to jpeg.
Instead if would just check the file contents against the image formats it knows, and then give up when it doesn't find a match.
[deleted] t1_ixvh0jb wrote
[removed]
Viewing a single comment thread. View all comments