cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Insert an image in MathCAD 15 header

SS_10514537
4-Participant

Insert an image in MathCAD 15 header

Hello,

I am trying to insert a bitmap image into the header of MathCAD 15, its size is about 124kB. Could someone assist me with it ? I get an error saying the tool is unable to read the file.

Thanks!

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:SS_10514537)


@SS_10514537 wrote:

Hey, 

Sounds interesting. How do we find out its OS/2 BMP and convert to Windows BMP ? 

Appreciate your help.


My idea was to load it in a an image editor and resave it as I suspected some kind of format discrepancy when I got the very same error message  you experienced. And the program suggested "OS/2 bitmap" as file format for saving and so I realized that its not in Windows bitmap. Actually I wasn't aware of an OS/2 bitmap format and don't know what the difference is. Guess its a completely different format and only shares the same extension "bmp". I used the rudimentary pic editing functions of a screenshot program to do the job, but I guess any decent picture editing program would do fine.

EDIT: Just gave it a try with Windows Paint and the conversion to Windows Bitmap worked equally well.

I haven't tried for long to get it actually displayed in the header. Maybe its just necessary to make the margins wider to do the job.

EDIT: Tried it and succeeded. Setting the top margin to about 37 mm does the job.
It was a bit strange. When the margin was set to 10mm, Mathcad imported the pic without any message but did not display it. When I had set the margin to 30 mm, Mathcad told me (when I imported the pic) that it was too tall and asked if the margins should be set automatically so that the pic would fit.

Anyway - your problem should be solved if you

  • open the picture file in Windows Pain and immediately resave it
  • make the margins in Mathcad large enough and then insert the pic in the header

 

 

View solution in original post

12 REPLIES 12
LucMeekes
23-Emerald III
(To:SS_10514537)

You say 'bitmap image', but what is the file type of the image.

Is it a .jpg, a .tif, a .png or (the one definitely supported) .bmp?

 

Success!
Luc

 

SS_10514537
4-Participant
(To:LucMeekes)

Hi Luc, Yes the file has .bmp extension.

LucMeekes
23-Emerald III
(To:SS_10514537)

Can you attach the .bmp file to this thread. I'm curious.... I did not find a .bmp file that Mathcad would not read.

 

Success!
Luc

SS_10514537
4-Participant
(To:LucMeekes)

Luc, I would not be able to share the .bmp file unfortunately here. I compressed the bmp image to about 50kB from 100kB, but it says the below error :

SS_10514537_0-1670018429898.png

Thank you for trying to help me in this regard.

 

What if you try to use some other random ".bmp" image file to insert?

SS_10514537
4-Participant
(To:VladimirN)

Hey,

I tried with another random .bmp file too but the tool is unable to recognize. I am sharing one random bmp file here for you to try it out if you can.

Thanks.

Werner_E
25-Diamond I
(To:SS_10514537)

The picture you posted is in OS/2 Bitmap (BMP) format! After converting it into Windows bitmap (BMP) format (see attached), Mathcad 15 seems to be willing to accept it.
At least it showed without throwing an error as {image} in the View-Header and Footer dialog box as its supposed to do. Unfortunately it did not display in the Print Preview, though 😞

I was only able to read it in with READRGB and display it in the worksheet using the pic operator,

Werner_E_1-1670290698108.png

but I did not succeed displaying it in the Header - neither in the preview nor in an actual test print.

EDIT: Reason was that the margin was set too small. See my answer below.

 

SS_10514537
4-Participant
(To:Werner_E)

Hey, 

Sounds interesting. How do we find out its OS/2 BMP and convert to Windows BMP ? 

Appreciate your help.

Werner_E
25-Diamond I
(To:SS_10514537)


@SS_10514537 wrote:

Hey, 

Sounds interesting. How do we find out its OS/2 BMP and convert to Windows BMP ? 

Appreciate your help.


My idea was to load it in a an image editor and resave it as I suspected some kind of format discrepancy when I got the very same error message  you experienced. And the program suggested "OS/2 bitmap" as file format for saving and so I realized that its not in Windows bitmap. Actually I wasn't aware of an OS/2 bitmap format and don't know what the difference is. Guess its a completely different format and only shares the same extension "bmp". I used the rudimentary pic editing functions of a screenshot program to do the job, but I guess any decent picture editing program would do fine.

EDIT: Just gave it a try with Windows Paint and the conversion to Windows Bitmap worked equally well.

I haven't tried for long to get it actually displayed in the header. Maybe its just necessary to make the margins wider to do the job.

EDIT: Tried it and succeeded. Setting the top margin to about 37 mm does the job.
It was a bit strange. When the margin was set to 10mm, Mathcad imported the pic without any message but did not display it. When I had set the margin to 30 mm, Mathcad told me (when I imported the pic) that it was too tall and asked if the margins should be set automatically so that the pic would fit.

Anyway - your problem should be solved if you

  • open the picture file in Windows Pain and immediately resave it
  • make the margins in Mathcad large enough and then insert the pic in the header

 

 

SS_10514537
4-Participant
(To:Werner_E)

Thanks much Werner, your explanation worked for me. Have a good day!

LucMeekes
23-Emerald III
(To:Werner_E)

It's a format discrepancy that causes it, that I agree on. But it's not because it's an OS/2 format. Here is the info on the file from the OP that will not load (in Mathcad 15, and also not in Mathcad 11):

LucMeekes_0-1670353262799.png

These are the properties of two other files that will load and show:

LucMeekes_2-1670353456662.png

LucMeekes_3-1670353490717.png

I guess Mathcad doesn't like bitmap files with a set value for pixels per inch.

 

Success!
Luc

 

 

SS_10514537
4-Participant
(To:LucMeekes)

Hello Luc,

I understand. Appreciate you providing extra clarity on this.

Thank you all for your support in this regard.

Announcements

Top Tags