Strip extension for Load Image
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.
Thanks for the suggestion. I will look into implementing this in the next version.
July 24, 2020 at 09:07 am - Permalink
In reply to Thanks for the suggestions. … by Igor
Great, thanks!
July 24, 2020 at 10:05 am - Permalink
FYI: This is implemented in IP9 as /CUNM (clean up name) flag.
July 24, 2020 at 02:11 pm - Permalink
Just to clarify, does /CUNM only cleanup the file name, or is there also an option (like /CUNM=2) that will also strip the file extension?
July 27, 2020 at 08:09 am - Permalink
The current implementation only cleans up the name.
July 27, 2020 at 11:08 am - Permalink
Thanks for the info. A "strip extension" option would be great, but automatically cleaning up the name is already a very useful improvement.
July 27, 2020 at 12:28 pm - Permalink