|
![](/i/fill.gif) |
> But when i want to use another imageformat (e.g. png), how can i send it
> as a parameter to the macro?
> Does anyone from the experienced users has some advices to make it even
> more flexible?
You could use some of the string-functionality to clip off everything until
the "." in the filename. Note that you can't just clip to the last 3, as
some might save with "JPEG" instead of plain, 3-digit "JPG". Then again, you
could tell that someone did that if the remaining 3 digits showed "PEG"...
Anyways, once you have the last three digits, use
strcmp(One_String,Another_String) and check if they're equal (if they are,
strcmp returns the value 0). Use the proper format according to the results.
(e.g. #if (strcmp(TestThis,"png")) png #end).
Of course, this won't work when somebody doesn't supply an ending for their
images, but shame on those that do that! :-)
--
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>
Post a reply to this message
|
![](/i/fill.gif) |