|
You might want to check out this article[^]. (Window regions are simply lists of rectangles that cover the desired area)
----
It appears that everybody is under the impression that I approve of the documentation. You probably also blame Ken Burns for supporting slavery.
--Raymond Chen on MSDN
|
|
|
|
|
I'm attempting to write a *RAW* DV stream to a file (for other processing on it later).
In GraphEdit -
* RenderFile some (any) media file
* Delete the video renderer
* Insert DV Video Encoder and connect input pin to (some decoder's) remaining video output pin
* Insert an AVI Mux and connect to DV Video Encoder output pin
* Insert a FileWriter and connect input pin to AVI Mux video output pin
Running this results in a valid AVI file with DV media. OK, But...
This file includes the AVI wrapper header information, and this is my problem. I need ONLY the DV stream data itself, with no AVI header.
The the DV Video Encoder output pin (an XForm Out pin) will not connect directly to FileWriter input pin.
So I must understand how to convert the DV Video Encoder XForm Out stream to a form the FileWriter input pin will accept. I'm guessing I need to make a filter using CTransInPlaceFilter, but I'm not yet sure, or how to do it. Does anyone know of sample code to accomplish this?
Alternately, AVI Mux makes the correct connection, but adds the AVI header. Does anyone know of example source code for the AVI Mux Filter?
Any other suggestions welcome.
Thanks very much
Brooks
Brooks
|
|
|
|
|
The DV Encoder Filter's output pin has the following format:
Major type: MEDIATYPE_Video
Subtype: MEDIASUBTYPE_dvsd
Format type: FORMAT_VideoInfo
The File Writer Filter's input pin supports this format:
Major type: MEDIATYPE_Stream
Subtype: MEDIASUBTYPE_NULL
A transinplace filter won't work since the input and output pins must be the same.
A custom transform filter (CTransformFilter) could work though.
It may be less work to do a custom renderer filter that accepts the DV Encoder Filter's output
format and simply writes the raw DV data to a file. The "Dump" sample filter in the SDK may be a
good starting point.
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Good call. That'll do it. Almost obvious, but hadn't occured to me. Thanks.
Brooks
|
|
|
|
|
This is a repost from the MS GDI newsgroup.
Does anyone know why, in the following code, does the IsVisible() call return true?
Mark
Rect gdiText(507, 636, 6, 7);
Rect rctOne(512, 684, 20, 17);
Rect rctTwo(652, 220, 47, 9);
Region gdiRegion;
gdiRegion.MakeEmpty();
gdiRegion.Union(rctOne);
gdiRegion.Union(rctTwo);
gdiRegion.IsVisible(gdiText);
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
It doesn't, it returns false.
I cut/paste the above into a new project and it was fine.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
I was afraid of that. If you get a chance can you please check your gdiplus.dll version?
It doesn't work properly for me or the OP.
Thanks much!
Mark
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
I'm running Win2003 R2 x64.
From VS 2005 i created a new Win32 x86 project and pasted the code in the WM_PAINT case.
My gdiplus.dll's are:
C:\WIN\WinSxS\amd64_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.3790.1830_x-ww_56CDF238\GdiPlus.dll File Version: 5.2.3790.1830 (srv03_sp1_rtm.050324-1447)
and,
C:\WIN\WinSxS\x86_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.3790.1830_x-ww_24C40C58\GdiPlus.dll File Version: 5.2.3790.1830 (srv03_sp1_rtm.050324-1447)
...cmk
Save the whales - collect the whole set
|
|
|
|
|
I was afraid of that too LOL
Mine is XPSP2 gdiplus.dll is 5.1.3102.2180
Where is the mythical GDI+ 1.1 ...
Thank you!
Mark
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Hello Gentlemen!
I am working on a project in vb.net. The application will color any grayscaled picture in its actual colors. The problem is big!
All I need is an accurate advise or direction how to setup an algorithm to find the exact colors of the picture.
It seems to me that I have to find the color of each pixel first and then what? Is there any matrix about the colors what reflects a paralelism between graysacaled color set to others.
Any advise would be helpful..
Thank You!
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
I don't think you can get exact colors from a grayscale image.
Have you searched for "colorize algorithm"?
Mark
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
JUNEYT wrote: All I need is an accurate advise or direction how to setup an algorithm to find the exact colors of the picture.
there is no way to find the "exact color" of pixel from panchromatic (greyscale). The primary issue is that panchromatic is usually luminance which follows a ration of RGB light there will usually be more than 1 color value triplet to match each pancromatic pixel.
you are trying to reverse this formula: RGB Luminance value = 0.3 R + 0.59 G + 0.11 B
so if the luminance value is say 255 (bright white luminance) what is the values of R G and B? If you know the most prominant color, a color reference, then you can figure out from the ratios the others involved.
Colorizing Panchromatic from low-resolution color reference[^]
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
Damn! I wanted to read that pdf but it froze while loading
I'll try later. Thanks for the link!
Mark
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Mark Salsbery wrote: Damn! I wanted to read that pdf but it froze while loading
http://www.google.com/search?hl=en&q=panchromatic+colorizing[^] there's always fun reading there. If you have my same idea of fun.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
Gracias!
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
You are very welcome. Always willing to encourage the image processing addiction... you'll hate me later.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
It's way too late. My first computer job that's what I did.
The challenge lately has been to not get sucked into it, for the time being
Hopefully soon I'll have someone to do my UI programming so I can get back to the fun stuff!
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Thanks you very much Jeffry.
I was intending to pull my sleves and jump into coding but when I examined the sophisticated algorithm behind it, I decided to roll back my sleves...
Thanks a lot!
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
JUNEYT wrote: but when I examined the sophisticated algorithm behind it
It is the stuff that master's thesises are written about. I know of about four. none of them mine, sorry. Though my work was turned into a master's thesis, it just wasn't for me, someone used my work to get theirs.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
I am programming a small drawing application.
And what I do is rubber band a red circle and draw in black (eventually any color but red). And my program draws designs inside of the circle, and then when the user is done, the user can make a new circle. And I want the circle to erase itself and not the designs it may encounter in the rubber banding. I would like to know how to just erase the circle.
This means I am asking a general mixed mode involving the SetROP2 function in the Windows GDI. Is there a way to draw on a client window and erase only the pen color? (Erase means make it white.)
Andrew Katz
|
|
|
|
|
This has nothing to do with ROP, just draw the circle based on a Boolean flag and when the flag changes issue a command to redraw the area that contained the circle.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
Can I select a DIB into a memory Device Context?
If yes, then how?
B2C
|
|
|
|
|
No.
The docs for SelectObject[^] explain what can be selected into a DC.
But, you can select a DIBSection into a mem DC. See CreateDIBSection[^]
or you can create a DDB from a DIB with CreateDIBitmap[^]
Mark
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Sorry, wrong! Unless you know something I do not.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
Are you sure you're not mixing up DDBs and DIBs? If so how does one select a DIB into a
device context?
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|