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
 image.import.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
gorlins Posted - 07/16/2004 : 3:23:22 PM
I'm having trouble using the image.import functions (both through Origin C and LabTalk). The code I use is essentially like what's pasted below (i'm certain there isn't a semantic problem in the code). The problem is that the images are only successfully imported occaisionally, and after one import fails (no data is copied into the matrix), Origin has to be restarted before an import will succeed. Half of the time the import will not succeed at all, even after the computer is rebooted. I've even experienced this without recompiling my code, on different days. Has anyone experienced a problem like this?

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;
}
1   L A T E S T    R E P L I E S    (Newest First)
Iris_Bai Posted - 07/27/2004 : 10:14:43 PM
Hi,

I cannot reporduce your problem. Using the codes below can import image into matrix successfully each time in 7.5 853.

void test()
{
MatrixPage mp;
mp.Create("Origin");
import_image(mp.GetName(), _L("C:\\bs.bmp"));
}



Iris

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