|
hi shog,
Thanks for your information.I got it
|
|
|
|
|
hi,,,,,
I have Pixel information for all letters in one Font(xxxxx Font).
I want to make BITMAP FONT using pixel information....
How can i move forward!!!!!!
Any sugestions!!!
Thank u....
|
|
|
|
|
First, you need to look at the specification for how the pixels are specified in the font file. Then you simply need to create a black and white, or other color, bitmap with those pixels filled in.
If you don't have the data, you're just another a**hole with an opinion.
|
|
|
|
|
Hi,
iam in c# windows application (.net framework 2.0)
iam displaying an image(*.jpg) in PictureBox Control..
now i want to draw a line or rectangle or any arrow mark over on image...
please help me how can i do this..
murali krishna
|
|
|
|
|
|
I wish to create a simple tool to open a video file ( for example an AVI, or wmv file) and allow user to edit the video file.
For example the user should be able to mark different portions of video and copy it to new video. So that the new movie file contains the selected parts only.
I read that DirectShow editing service allow us to do the job.
i have modified the sample code http://msdn.microsoft.com/en-us/library/ms787592(VS.85).aspx and no luck so far. I think i am missing something, since my knowledge in DirectX and grphics is very poor, I cant figure it out.
I added the following lines to get the splitable interface
IAMTimelineSplittable *pSplittable = NULL;
HRESULT hr = pSourceObj->QueryInterface(IID_IAMTimelineSplittable, (void **)&pSplittable);
and called the SplitAt function to split time line
hr = pSplittable->SplitAt2(5);
All thease function return success ( S_OK) and then i render the Timeline to file, it is same as the orginal file. No Splits actually happened.
Why? Any idea
Thanks
Anil
|
|
|
|
|
hi
I have task to join different map images on single Map.
How to do this
|
|
|
|
|
Are you asking how to make a large image from a mosaic of smaller ones or is the problem with aligning and matching the different parts of the map?
If you don't have the data, you're just another a**hole with an opinion.
|
|
|
|
|
aadilali wrote: I have task to join different map images on single Map.
How to do this
I like to use Scotch Tape[^]. It's a little bit more pricey than the generic transparent tape, but tends to stay clear longer and is less prone to tearing. A good drafting table can also be helpful.
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
Hi All,
I have a big VRML model of a building which I divided into small vrml files such as: floor1.wrl, floor2.wrl, roof.wrl, and so on. Basically, I used 'Inline' node to import all of these small vrml files into my mother vrml file called 'building.wrl'.
I am using VB.NET form interface to allow the user to interact with the geometry. It works fine when I load any of the small vrml files (e.g. floor1.wrl) and then I can obtain the name of 3D elements in floor1 so that the user can change their texture. The problem is that when I load the main vrml file 'building.wrl' I am unable to interact with 3D elements inside the 'Inline' node.
So my question: how can I interact with the element/geometry inside an 'Inline' wrl file? Any feedabck or suggestion is very appreciated. I searched the internet for solution but could not find any.
Please please help
Thanks
|
|
|
|
|
Hello
I have build DirectShow filter graph (VideoCapture -> SampleGrabber -> NullRenderer).
VideoCapture is a filter getting a video stream from a camera (FOURCC code Y160, Media subtype raw).
When I am trying to get a sample from the camera I am getting a message "failed to get sample" in output window (debug mode) and a buffer being filled with zeros.
Please give some advice on how to solve this problem.
|
|
|
|
|
You need to include some code, there is a million and one reasons for a sample failure.
|
|
|
|
|
 This code build a graph. The graph consist of the following filters
m_PDF - the filter which is able to receive the IR stream
m_pSampleGrabber - the SampleGrabber filter
m_pNullRenderer - the NullRenderer filter
.....
if (!MakeBuilder())
{
TRACE(TEXT("Cannot instantiate graph builder"));
return E_FAIL;
}
hr = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC,
IID_IGraphBuilder, (void **)&m_pGB);
hr = m_pBuilder->SetFiltergraph(m_pGB);
hr = AddRTSPFilter(ip);
hr = AddSampleGrabber();
hr = AddNullRenderer();
hr = ConnectFilters(m_pGB, m_pDF, m_pSampleGrabber);
hr = ConnectFilters(m_pGB, m_pSampleGrabber, m_pNullRenderer);
SetFormat(5);
IMediaControl *pMC = NULL;
hr = m_pGB->QueryInterface(IID_IMediaControl, reinterpret_cast<pvoid>(&pMC));
LONG msTimeout = 1000;
FILTER_STATE pfs;
long lSize = 0;
ISampleGrabber* pGrab = NULL;
if (m_pSampleGrabber)
{
hr = m_pSampleGrabber->QueryInterface( IID_ISampleGrabber, (void**) &pGrab );
if ( SUCCEEDED( hr ) )
{
hr = pGrab->SetOneShot(TRUE);
hr = pGrab->SetBufferSamples(TRUE);
}
}
hr = pMC->Run();
long evCode;
IMediaEventEx* m_pEvent;
hr = m_pGB->QueryInterface(IID_IMediaEventEx, (void **)&m_pEvent);
m_pEvent->WaitForCompletion(INFINITE, &evCode);
long cbBuffer = 0;
hr = pGrab->GetCurrentBuffer(&cbBuffer, NULL);
char *pBuffer = new char[cbBuffer];
if (!pBuffer)
{
}
hr = pGrab->GetCurrentBuffer(&cbBuffer, (long*)pBuffer);
if (FAILED(hr))
{
pMC->Stop();
SAFE_RELEASE( pMC );
return hr;
}
SAFE_RELEASE( pMC );
.....
</pvoid>
ip - the IP address of camera
IID_IRTSPConfig - Image streaming is set up through RTSP
HRESULT NULL_Capture::AddRTSPFilter(CString ip)
{
HRESULT hr = S_OK;
BOOL bMulticast = true;
hr = CoCreateInstance(CLSID_FLIRRTSP, NULL, CLSCTX_INPROC,
IID_IBaseFilter, (void **)&m_pDF);
CComPtr<irtspconfig> pCfg;
hr = m_pDF->QueryInterface(IID_IRTSPConfig, (void **)&pCfg);
hr = pCfg->SetMulticast(bMulticast);
hr = m_pGB->AddFilter(m_pDF, L"Video Capture");
return hr;
}
HRESULT NULL_Capture::AddNullRenderer()
{
HRESULT hr = S_OK;
hr = CoCreateInstance(CLSID_NullRenderer, NULL, CLSCTX_INPROC_SERVER,
IID_IBaseFilter, (LPVOID*) &m_pNullRenderer);
hr = m_pGB->AddFilter(m_pNullRenderer, L"NullRenderer");
return hr;
}
HRESULT NULL_Capture::AddSampleGrabber()
{
HRESULT hr = S_OK;
AM_MEDIA_TYPE* pmt = NULL;
ISampleGrabber *pCfg = NULL;
if (m_pSampleGrabber == NULL)
{
hr = CoCreateInstance( CLSID_SampleGrabber, NULL, CLSCTX_INPROC_SERVER, IID_IBaseFilter, reinterpret_cast<pvoid>(&m_pSampleGrabber));
hr = m_pSampleGrabber->QueryInterface(IID_ISampleGrabber, (void **)&pCfg);
hr = m_pGB->AddFilter( m_pSampleGrabber, L"Grabber");
AM_MEDIA_TYPE mt;
hr = pCfg->GetConnectedMediaType(&mt);
ZeroMemory(&mt, sizeof(AM_MEDIA_TYPE));
mt.majortype = MEDIATYPE_Video;
mt.subtype = GUID_MEDIASUBTYPE_Y160;
hr = pCfg->SetMediaType(&mt);
hr = pGrabber->SetOneShot(TRUE);
hr = pGrabber->SetBufferSamples(TRUE);
}
return hr;
}
BOOL NULL_Capture::MakeBuilder()
{
HRESULT hr;
if (m_pBuilder)
return TRUE;
hr = CoCreateInstance(CLSID_CaptureGraphBuilder2, NULL,
CLSCTX_INPROC, IID_ICaptureGraphBuilder2,
(void **)&m_pBuilder);
if ( NULL == m_pBuilder ) {
return FALSE;
}
return TRUE;
}
HRESULT NULL_Capture::EnumFormats(int fmt)
{
HRESULT hr;
IAMStreamConfig *pVSC = NULL;
hr = m_pBuilder->FindInterface(&PIN_CATEGORY_CAPTURE,
&MEDIATYPE_Video, m_pDF, IID_IAMStreamConfig, (void **)&pVSC);
(fmt >= 0)
{
VIDEO_STREAM_CONFIG_CAPS scc;
AM_MEDIA_TYPE *pmt;
hr = pVSC->GetStreamCaps(fmt, &pmt, (BYTE*)&scc);
hr = pVSC->SetFormat(pmt);
DeleteMediaType(pmt);
}
return hr;
}
</pvoid></irtspconfig>
|
|
|
|
|
|
um...
Ok, i gotta ask: is this like a classic problem that i should know about already, and just immediately recognize?
Or are you just leaving out a lot of details in your description?
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
I need to capture a video stream from a socket. (Least that is what it appears the requirements are.) Anyone know of sample(s) that can get me started??
Thanks,
ed
~"Watch your thoughts; they become your words. Watch your words they become your actions.
Watch your actions; they become your habits. Watch your habits; they become your character.
Watch your character; it becomes your destiny."
-Frank Outlaw.
|
|
|
|
|
hi there coders this is George, i've been working on a payroll project and i'm finding difficulty in my c++ console graphics. any one with any idea how to go about it?
you know a class for console graphics or guidelines on how to go about it. i've been seeing some documentation on gotoxy(int x, int y) but i really do not know how to use it.
*
i'm also thinking about how to control my keyboard input. you know stopping the keyboard from appearing on the console and display something simultaneously like ( password -> ********)
*
i've also been seeing some console that are able to create mouse buttons, how do they do that .
Never Underestimate Radical Vision(NURV)
|
|
|
|
|
geocyt wrote: i'm finding difficulty in my c++ console graphics. any one with any idea how to go about it?
Here is an article which designed a class to help you write console apps: Console Enhancements[^]
geocyt wrote: i'm also thinking about how to control my keyboard input. you know stopping the keyboard from appearing on the console and display something simultaneously like ( password -> ********)
In .NET, you can use the Console.ReadKey() method to get a key but not send output to the screen. Here is the MSDN documentation for ReadKey()[^]
So you could write something like this to output "****" to the screen while the user enters the password:
ConsoleKeyInfo keyPress;
keyPress = Console::ReadKey(true);
Console::Write("*");
|
|
|
|
|
Traditionally, you'd use a Curses library (so named because of what you'll spend most of your time doing once you get going with it...)
I've never tried using one on Windows before, but a quick search turns up this: http://pdcurses.sourceforge.net/[^]
Worth a look, maybe...
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
Shog9 wrote: Traditionally, you'd use a Curses library
real programmers don't curse... they poke.
I had a full library of hand optimized asm code to do text graphics. ahhhh the memories....
Under DOS, text mode memory is useually b800h
http://c.snippets.org/[^]
wputch() commands
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
John Andrew Holmes "It is well to remember that the entire universe, with one trifling exception, is composed of others."
modified on Thursday, June 19, 2008 2:49 PM
|
|
|
|
|
I remember doin' that with, i think, GWBASIC. Don't know that i've ever tried it under Windows though.
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
http://cpp.snippets.org/[^] try wputch() here.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
John Andrew Holmes "It is well to remember that the entire universe, with one trifling exception, is composed of others."
|
|
|
|
|
How to change specific color with some else color in image.
|
|
|
|
|
read my image processing articles. Iterate over the pixels, and when you find one of the source color, change it to the target color.
OR - you can use an ImageAttributes instance to draw an image and set a color matrix to change the color in one go, I believe.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
You don't mention the format of your image. In some formats the color data is in each pixel, in others the pixels are an index into a color table. It makes a difference as to which part you search. If the color is in the pixels, unless your image is artificially generated or size of the pixels in color value is small, you're not likely to get many exact matches.
If you don't have the data, you're just another a**hole with an opinion.
|
|
|
|
|