using direct x,direct show method in control center

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
gean_3054931
Level 5
Level 5
10 likes given 5 likes given First like received

Hello,

how can we display fx2lp data(imge data) in the control center(or streamer) using direct x and direct show method?

anybody have done it?please let me know.

cypress has any code snipet regarding this host application?

thanks.

geetha

0 Likes
1 Solution
SrinathS_16
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello Geethanjali,

Cypress does not provide a ready application that uses the Direct Show APIs to display image on the UI.

The below code snippet can be used to convert raw data into bitmap format that can be displayed on a Picture Box in Windows Forms Applications.

{

Bitmap bitmap = new Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format8bppIndexed);

BitmapData bitmapData = bitmap.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.WriteOnly, bitmap.PixelFormat);

Marshal.Copy(read_data, 0, bitmapData.Scan0, read_data.Length);

bitmap.UnlockBits(bitmapData);

pictureBox1.Image = bitmap;

}

Best regards,

Srinath S

View solution in original post

3 Replies
SrinathS_16
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello Geethanjali,

Cypress does not provide a ready application that uses the Direct Show APIs to display image on the UI.

The below code snippet can be used to convert raw data into bitmap format that can be displayed on a Picture Box in Windows Forms Applications.

{

Bitmap bitmap = new Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format8bppIndexed);

BitmapData bitmapData = bitmap.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.WriteOnly, bitmap.PixelFormat);

Marshal.Copy(read_data, 0, bitmapData.Scan0, read_data.Length);

bitmap.UnlockBits(bitmapData);

pictureBox1.Image = bitmap;

}

Best regards,

Srinath S

Hello,

thanks for giving reply about Direct X, Direct show , and can you just tell some what clearly about bitmap generation which you sent above ,for that how we have to give input directly from buffer without writing it int file .

Best regards

Geetanjali  T D

0 Likes

Hello Geethanjali,

Yes, the buffer that is used to read data from the FX2LP is passed as an input to this function block. I have named it as 'read_data'.

Best regards,

Srinath S

0 Likes