Add `IMB_ispic_type_from_memory` so we can detect the format of a packed file.
This removes `is_a_filepath` callback and uses a magic check for photoshop files
that's compatible with OIIO.
This means we can know the file format without having the file on-disk (packed files) for e.g.
Even though OIIO doesn't support packed images, this doesn't have to prevent us from being able to check the file-type of in-memory data.
----
- Description of the problem that is addressed in the patch.
Currently we can't know the format of a packed image.
- Description of the proposed solution, and a motivation as to why this is the best solution.
Use `is_a` callbacks for all image types (this was only missing for photoshop files)
- List of alternative solutions, and a motivation as to why these are undesirable.
{D9500} could be fixed differently, for example the file-path of generatedimage files could always be set on packing, but this only solves the issue for newly packed files.
- Limitations of the proposed solution.
None, it's using existing API's in a more consistent way.
----
User benefit is that the fix proposed in {D9500} can be done without the performance penalty of having to load images.
See {D9500}.