The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Read BMP image into a matrix

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Joop.Baltu1 Posted - 07/18/2003 : 07:43:31 AM
I would like to read a bmp image into an Origin matrix. If I just read the matrix with origin itself I could not find a method to attach this matrix e.g. "Matrix1" to a matrix object. Apparently it is not enough to use the matrix.Attach command.

My trials included the command:
mat.GetPage().ReName(winName);
with as result
(35) :Error, Member function Page::ReName not defined or does not have matching prototype.

It would be even more easy to read the file directly into a new matrix using an origin C command.

regards,

Joop

Edited by - Joop.Baltu1 on 07/18/2003 07:54:02 AM
1   L A T E S T    R E P L I E S    (Newest First)
eparent Posted - 07/18/2003 : 09:28:39 AM
Here is a simple OriginC function that will import a specified image file into a specified matrix window.


bool import_image(LPCSTR lpcszMatrix, LPCSTR lpcszFile)
{
Page pg(lpcszMatrix);
if( !pg || EXIST_MATRIX != pg.GetType() )
return false;
string strPage = lpcszMatrix;
if( !lpcszFile )
return false;

using Image = LabTalk.Image;
Image.FileName$ = lpcszFile;
int iErr = Image.Import.Matrix(strPage);
if( iErr )
{
printf("Import Error %d\n", iErr);
return false;
}
pg.LT_execute("matrix -ii"); // show matrix as image
return true;
}




The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000