How do you make MathCad display a grey-scale image?
Rumour has it that the pixel values are integers from 0 to 255.
Could somebody tell me the data type that is displayed
and the command that puts it on the screen?
A JPEG save would be nice too.
Thank you for the reply but this is the inverse of my problem.
If I want to see an image calculated by MathCad,
I need to know what kind of data structure to load,
and what command to use to make it into the image.
Thank you Fred and Valery and Viktor.
Too bad MatCad doesn't believe in synonyms in their 'Help' index,
which, incompetantly, doesn't breathe a mention of 'grey scale'.
This is a common failing of big software packages,
that you can never guess what they call things
that could be described in several ways,
only one of which they bother to consider.
Instead the hapless newbie has to depend upon the charity of volunteers,
so ncomplete is the package he paid for so dearly.
No doubt PTC will continue to ignore this elementary issue,
which could easily be remedied by using outsider newbies for beta testers,
rather than the program designers, who already know all the answers.
Are you listening PTC? Get a GLOSSARY!!!!!
When I search the help for "grayscale" I get four hits. One of them is "Working with a picture". That page, and the other pages it links to, gives you the information you were looking for.
HA HA, silly me for typing in 'GREY SCALE" as two words.
PTC couldn't bother putting the universal two-word rendition in their dictionary?
No, only their own lazily parochial one-word variant is most unhelpfully there.
I can't remember the trick of how to make the notation i:=0..255
I don't see it anywhere in Maxfield's clumsy textbook
and I can't imagine what the Help file would call it.
When I type it in literally I get a useless red 'syntax error'.
Would it be too much for that warning to link to a cure?
The first operator is assignment, which you get with a colon, ":". The right hand side is a range variable. You get the two dots with a semicolon, ";". The range variable is also on the Vector and Matrix toolbar.
Thank you Richard.
It's too bad I have to trouble you for something so elementary,
but there's no help entry for 'semicolon'.
Why couldn't that useless syntax error message just tell me to try a semicolon?
Upon reading the intro on 'range variables', the only thing I see is 0,1,..n and nothing about 0..n
so I was forced to conclude that the latter is something else entirely.
Thank you Vladimir for this. I never would have found it on my own, so hidden it is.
By the way, doing the WRITEBMP the way this book says DOES work,
whereas the format in the main help file does NOT.
PTC please correct that error.
WRITEBMP("file", [M]) WHICH DIDN'T WORK
Did you put it on the right hand side of a defintion operator?
I don't have a way to check the version 14 help, but version 15 says:
WRITEBMP("file", [M]) Creates an grayscale bitmap image file. This function can be used either on the right or the left side of the definition operator. When used on the right, you must supply the argument M, the name of the matrix to write to the file. In this case, the function returns 0. When used on the left, do not supply the argument M, but instead place it on the right hand side of the definition.
which also covers the case in the image processing book.
A grayscale image is a matrix of numbers between 0 and 255. If you want to view it go to "Insert" "Picture", as shown by Viktor, and type the name of the matrix into the placeholder.