cancel
Showing results for 
Search instead for 
Did you mean: 

USB Low-Full-High Speed Peripherals

gean_3054931
Contributor II

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

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

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

gean_3054931
Contributor II

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
SrinathS_16
Moderator
Moderator

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