|
I believe it gives access to audio stream also, I don't see why not.
Or could that be the reason I can't load WaveDest filter ? Because it won't allow access to audio stream?
Perhaps you'll be able to figure it out better when you take a look at it.
Claudiu
|
|
|
|
|
hmm I don't see any audio stream inserts there.
Maybe contact Ivan and ask him to add it! It should be pretty simple
Although it uses directShow, it's an all-in-one app. Unless he provides an insertion point for
external filters (like he has for video) there's no way to get at the filter graph to manually
insert filters.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Thought so... I'll contact him regarding this matter.
Thank you so much for your support. If I'll need more help I'll get back with some more posts .
Claudiu
|
|
|
|
|
How can we save the contents of a Graphics object as a jpg ???
thanks
|
|
|
|
|
|
How can we combine a transparent GIF image with a JPG file and save the resulting image in disc.
I want the GIF to act as a frame that we can see the JPG image through it . Help me please.
Thanks.
|
|
|
|
|
If you use GDI+ you can load the jpeg, assoiciate it with a Graphics object, and draw the gif
transparently on top of it.
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Please don't cross post in multiple forums!
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
In GDI+ in .NET ,How can we load a jpg image from disc and scale it to a smaller size and then save it to disk..
Help me please I need this now .
Thanks.
|
|
|
|
|
Here's one way:
1) Create a System.Drawing.Bitmap of the desired destination pixel format and dimensions
2) Create a destination System.Drawing.Graphics object from the bitmap (using Graphics.FromImage)
2a) *optional* set the InterpolationMode property on the destination Graphics object
3) Load the source image as a System.Drawing.Bitmap
4) Use Graphics.DrawImage to draw the source image on the destination graphics (created in step 2)
5) Save the destination bitmap (created in step 1)
-- modified at 14:17 Tuesday 10th April, 2007
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Does anyone know, please, how to install this very useful previewer? The code comes with a .txt file but I just don't understand it! It talks about changing paths, which I really don't get. Can anyone help with an explanation in plain English, please? (and help others struggling, too)
Many thanks.
Roy
|
|
|
|
|
In the folder with the dll file, open a command prompt with admin privileges
gacutil -i MsdnMagPreviewHandlers.dll
regasm /codebase MsdnMagPreviewHandlers.dll
gacutil -i PSDPreviewHandlers.dll
regasm /codebase PSDPreviewHandlers.dll
thats it , check by clicking the psd file and view in the preview pane
Omit Needless Words - Strunk, William, Jr.
Vista? Photoshop Preview Handler here
|
|
|
|
|
Hi
Im coding a virtual hair styling and makeover tool in C#. Can any buddy know any link or idea abt virtual makeover.... Any link for the help.......
actually when I apply makeover it should blend the applied color on the skin. How can I get the blended effect?? Wht function I should use on the pixel previos color and the new color to be applied........ ANY Idea?????
|
|
|
|
|
I am looking at the new Vista/07 styles and was wondering what the formula was for creating the gradients.
Brad
Australian
- unknown PHP Developer on "Job Prospect"
Requirement: * Experience working with XML, XSL, XPath
Comment: and other things starting with X.
|
|
|
|
|
I don't understand your question... I noted nothing misterious with Vista's gradients... maybe you mean gradients in color and in transparency? Or are you just asking about gradients in general?
|
|
|
|
|
Yeah just gradients in general. I know nothing of graphics
|
|
|
|
|
Ok.
Modern computer graphics consist of pixels, which are the smallest units of color that can be represented on the screen. A screen of 1280x1024 contains 1.3 million pixels, and a modern display can set each one of those pixels to an individual color.
These pixels are divided into 3 components: the red, the green, and the blue. This is because almost every color that our eyes can distinguish can be obtained by combining diferent amounts of red, green, and blue. So, controlling only these 3 components can make it possible to obtain almost any possible color.
Then there is component resolution. Each component can be varied in intensity to achieve diferent colors, as I mentioned before. Usually we cannot distinguish between more than about 150 steps, meaning that if the span of a given component (from invisible (or off) to its full intensity) is divided into more than about 150 steps then we cannot tell the difference from one step to another. So we don't need to divide the span into more than 150 steps. However we divide it into 256 steps, to make it confortable to store components in computer memory (one byte per component) and for some other not so obvious reasons. This givs us a total of over 16 million individual colors (with 256 steps per component we get a total of 256x256x256 different colors).
To get white you sum all components (you set red, green, and blue, to full intensity). This is the whitest that a screen is able to represent. To get black you turn them all off, and that is the blackest that a screen can represent. Screens vary in their ability to make full white or full black. For example, my video projector is unable to make perfect white because the blue component is a little weaker than the others (as with many of the mid-range video projectors). Also, LCD's/TFT's are unable to make perfect black, usually because the material used for their construction usually reflects some envoronmental light.
If you want a gradient from black to white (from left to right, for example) then you should vary the component intensity from off (to the left) to on (to the right). Imagine an image of 800x600 and the following formula:
for(x=0; x<800; x++) {
for(y=0; y<600; y++) {
pixel(x,y).red=x/799*255;
pixel(x,y).green=x/799*255;
pixel(x,y).blue=x/799*255;
} // next y
} // next x
As you can see, x/799 is 1.0 only when x is 799, and that happens only at the rightmost pixel. Also, x/799 is zero on the left. An inversion would be simple, just replace x/799 by (799-x)/799. Also note that the component intensity does not depend on y, so there are changes only from left to right and not from top to bottom.
If you wanted full white on the top left and full white on the bottom right, the formula would be:
for(x=0; x<800; x++) {
for(y=0; y<600; y++) {
pixel(x,y).red=(x+y)/(799+599)*255;
pixel(x,y).green=(x+y)/(799+599)*255;
pixel(x,y).blue=(x+y)/(799+599)*255;
} // next y
} // next x
Again (x+y)/(799/599) is zero at the top left, and one at the bottom right. At the bottom left it is some intermediate level of gray (between black and white) as well as on the top right. If instead of black to white you wanted black to red then you just keep the green and blue at zero through all the operation.
for(x=0; x<800; x++) {
for(y=0; y<600; y++) {
pixel(x,y).red=(x+y)/(799+599)*255;
pixel(x,y).green=0;
pixel(x,y).blue=0;
} // next y
} // next x
At the top left all components are zero (black) and at the bottom right red is one and the others are zero. Orange is about full red, half gree, and zero blue. To go from black to orange you would do:
for(x=0; x<800; x++) {
for(y=0; y<600; y++) {
pixel(x,y).red=(x+y)/(799+599)*255;
pixel(x,y).green=(x+y)/(799+599)*128;
pixel(x,y).blue=0;
} // next y
} // next x
At the bottom right the pixel is full red, half green, and zero blue.
So, as you can see, the formula is simple after you know what you want. As you can imagine it would be easy to get gradients with many diferent colors by using more elaborate formulas. In general, you just need a function...
GetPixelComponets(float dx, float dy, int& dst_red, int& dst_green, int& dst_blue);
... that takes normalized X/Y coordinates (dx/dy from 0.0 to 1.0 so as not to depend on screen resolution) and computes what the component values dst_red, dst_green, and dst_blue should be for that screen point. Then that function simply has to take some set of references of the colors you want and where (in the above examples I wanted 2 reference points: a given color on the top left and another on the bottom right) and interpolate them (making smooth spatial transitions from a reference point to the next).
I hope this helps,
Rilhas
|
|
|
|
|
Thank you very much for this, it is fantastic advise.
Brad
Australian
- peterchen on "Who has the worst keyboard"
Keyboard? Ha! I throw magnets over the RAM chips!
|
|
|
|
|
Hi
I'm working on a teleprompter software (that flips a given text and lets the user to scroll it pixel by pixel)
I tried GDI+ using C# .Each time the user wants to scroll the text an image of the current lines is made.Then the image is rotated and loaded into a pciture box.
Unfortunately this procedure is very slow.
I like to ask if there is anyway that I can do the same thing using DirectX or OpenGL (I've already searched the ineternet but I couldn't find any answer)
Is there any other way that I can show the text upside down and let the user to scorll it?
Thanks a lot
|
|
|
|
|
beatles1692 wrote: I like to ask if there is anyway that I can do the same thing using DirectX or OpenGL (I've already searched the ineternet but I couldn't find any answer)
Actually, you probably did, but didn't realize its use. Using a render-to-texture method for the text, you can with either directX or OpenGL (I am only familiar with OpenGL), render your text to a texture "off screen" this is your graphical text, you can then position and scroll it and then reset the texture and position coordinates when the next line comes up. The net effect is the appearance of single pixel, continuous scrolling. Alternately, you can just render the text to a quad surface as texture fonts and then just scroll the quads off the screen while adding new ones below. (See lesson 17[^]
the demo doesn't do what you want, but is capable of doing what you want when you learn the technique.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
HI,
I am a software engineer & i have been working on webdevelopment (ASP.NET) around 1 and a half year. Now i want to work on Directx game programming.. so i cant gets where to start and how to start..
Can anybody help me how to work on directx for game programming..or anyother way for game programming..??
Please help me..
thanks in advance
KHATRI
|
|
|
|
|
|
Hi there!
I was wondering how I could write/draw on my desktop and I tried using native C#-methods (System.Drawing, ...).
I managed to draw outside my application's window, but I could not force my application to draw between the desktop background and the icons on my desktop.
I once found a snippet of C/C++ source code that did exactly that, but was not able to translate it to C# successfully. (The snippet can be found here)
Does anyone in here know how to do what I want to do?
I mean, the space between desktop background and icons is somewhat unused and could get somehow useful through this method...like for example displaying a calendar or a CPU-load-meter or something similar to this...
I'm looking forward to your answers!
Regards - Soykaf
|
|
|
|
|
I am getting the exception "BufferedGraphicContext cannot be disposed of because a buffer operation is currently in progress". I am working in VS2005 writing in C#. It is being generated when zooming on a large bitmap (125+ meg) in pictureBox (I am servicing code and would like to not have to rewrite to remove pictureBox) . I am unable to locate where this exception is being thrown. I put a try/catch block on Application.Run() and found main app dispose is called shutting down the app, and the catch block is executed after the app has shut down. I had heard Microsoft had hard coded a size limit on pictureBox but cannot find the comment again. Does anyone know where this exception could be caught to prevent the app from shutting down or what I might try to prevent it from being thrown (disabling zoom is a last resort)
Thanks
Jim
|
|
|
|
|
An update. There is a size limit, it is associated with the bitmap not picture box, of 32767 (a signed 2^16) pixels height and width. I still am not sure where the exception was/is being thrown. Any suggestions would be greatly appreciated.
Jim
|
|
|
|