Strip extension for Load Image
Thu, 07/23/2020 - 08:46 am
When I load images, I generally want the newly created wave to have the same name as the image file. This is the default, except the wave name includes the file extension (and period), which means the wave name is no longer proper. Unless you rename the wave, this can make it slightly annoying to work with later on, and this behavior is inconsistent with the behavior of Load Waves, which automatically converts wave names into proper ones (changing periods to underscores, etc).
I can get around this by copying the file name (sans extension) from the path and selecting "Use the name:", but this is an extra step that I sometimes miss. What would be nice is to have underneath the "Use File Name for Wave" radio button a checkbox titled "Strip Extension" that would remove the extension in the wave name, or, more generally, a checkbox titled "Cleanup Name" that will apply the same cleanup procedures as Load Waves. I've run into this issue so often that instead of using the Load Image dialog I use a function I wrote that strips the extension. This isn't a huge deal, but it would be nice to have this behavior built in instead of having to use a function. Adding a strip extension or cleanup name flag to ImageLoad would be nice, but it really only saves a line or two of code, so is probably unnecessary, though it could be useful when using the /AINF flag.