DirectShow Sample Application: Load Bitmap from
Memory
The PutBitmap sample application demonstrates the
direct access to the image data buffer of the MV Image File Source filter
from within Visual Basic 6. The image file source filter provides
the functionality to directly write image data into the image
buffer instead of loading an image file. This is useful when it is
required to feed image data located in system memory into a
DirectShow filter configuration.
This and other sample applications can be found in the MV
Development Kit installation directory.
Filter Graph Summary
A very simple filter configuration is used for this sample
application, the MV
Image File Source filter is connected to the video
renderer displaying the image.
The Application
This simple sample application uses the MontiVision Smart Control to load
and start the above shown filter configuration. The image
'C:\ppol.png' is loaded once on startup and the frame rate of the
MV Image File
Source filter is set to one frame per second. The
filter events are
received throught the Smart Control. Within the source filters
MV_ALGORITHM_END_EVENT event, the sample application requests the
image data from the image file source filter using IMVImageFileSource2::GetBitmapVB,
inverts every byte of the image and sets the data back to the file
source filter using IMVImageFileSource2::PutBitmapVB.
|