I am trying to create a new Bitmap in MC++ from a (char) array (values from 0..255) . I have already searched some forums but unfortunately I cannot get it work. Thats my code:
int row, column;
char* arr = new char[size];
// values initialized here
/*
I know that I have to change the permissions here, but the line
[SecurityPermissionAttribute(SecurityAction:eny,UnmanagedCode=true)]
does not work. I have included System::Security:ermissions, but I guess I have to do more!
*/
// init IntPtr with address of array, ? correct ?
IntPtr iP = IntPtr(&arr);
Bitmap *p = new Bitmap(
row,column,row*sizeo(char),
System:rawing::Imaging:ixelFormat::Format8bppIndexed,
iP);
.... and this does not work!
Is there anybody who can give me a hint how to do this?
Thanks,
Franz
int row, column;
char* arr = new char[size];
// values initialized here
/*
I know that I have to change the permissions here, but the line
[SecurityPermissionAttribute(SecurityAction:eny,UnmanagedCode=true)]
does not work. I have included System::Security:ermissions, but I guess I have to do more!
*/
// init IntPtr with address of array, ? correct ?
IntPtr iP = IntPtr(&arr);
Bitmap *p = new Bitmap(
row,column,row*sizeo(char),
System:rawing::Imaging:ixelFormat::Format8bppIndexed,
iP);
.... and this does not work!
Is there anybody who can give me a hint how to do this?
Thanks,
Franz
Last edited by a moderator: