bluescan / tacentview

An image and texture viewer for tga, png, apng, exr, dds, pvr, ktx, ktx2, astc, pkm, qoi, gif, hdr, jpg, tif, ico, webp, and bmp files. Uses Dear ImGui, OpenGL, and Tacent. Useful for game devs as it displays information like the presence of an alpha channel and querying specific pixels for their colour.
ISC License
371 stars 35 forks source link

Manage supported extensions instead of hardcoding. #19

Closed bluescan closed 1 year ago

bluescan commented 3 years ago

The file dialog currently has the extension filter hardcoded. May need functionality in tacent to go from filetype back to associated extensions. Add 'CanLoad' (os maybe 'GetLoadableExtensions') and 'CanSave' (or GetSaveableExtensions) to the Image class (similar to tPicture).

Then will need to generate the filter from the functions above.

bluescan commented 1 year ago

The save filetypes in particular suffer from a switch on an int. There is no need to have this as there is now a managed list of filetypes supporting save.

bluescan commented 1 year ago

The cfg now saves filetypes based in the filetype name (not an int) and there is a tExtensions onject that holds all saveable types in a single location.