|
Something wrong with the bitmap I imagine.
Some image loading code is more forgiving than others
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I reveal little bit more: in my code the file size is not set into header, this is only difference against BMP file def. BUT, I have hex dumped many BMP header mady by different programs, and some of them there is neither file size set and these files are still openable with Win Fax Viewer + thumbnail! Magic!
|
|
|
|
|
Well since your image is perfect then you should report a bug to microsoft.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Tapio Grönfors wrote: Windows Picture and Fax Viewer can not view BMP files writen by self-made C++ code (Drawing failed). Either thumbnail of these files are not shown, but they are correctly openable at least with MS Paint, IrfanView and QuickTime PictureViewer. Whats the problem?
Let's see. Your homegrown code doesn't get the image shown in several applications. Obviously the problem is with them - it couldn't possibly be that there's a bug in your code now, could it?
|
|
|
|
|
How to identify the image is piggy backed or overlapped?
|
|
|
|
|
What image? What is "piggy backed or overlapped"?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I know you can make a icon using
'Icon k = Icon.FromHandle(WorkingImage.GetHicon());'
how do you add more than one icon to the icon file
When you take a Nerd and a Jock and put them together you get a Nock
|
|
|
|
|
There is only one way to have more than one Icon in the file.
Write the file using bytes yourself.
When you take a Nerd and a Jock and put them together you get a Nock
|
|
|
|
|
I am having trouble With drawing to an image using the Graphics class. I have tried
'...
void somebutton_click(...)
{
Graphics g = Graphics.FromImage(checkbox1.Image);
...
g.Draw...(...'
and
'Graphics g = checkbox1.CreateGraphics()'
the end result is a unchanged picture
please help, I am new
also if you did not see, the language C# and .Net framework
When you take a Nerd and a Jock and put them together you get a Nock
|
|
|
|
|
Since no one answered my question, the question was
1. A question so stupid that no one bothered to answer
2. No one knows
In the case of the second answer I will be answering my own question.
The answer was simple, The Graphics will not draw on a null image (I never assined the checkbox a image).
So to fix this problem you just give the checkbox a Bitmap in the beginning.
The weird thing is that the Graphics class gave no exceptions or errors other that the fact that it would not draw.
When you take a Nerd and a Jock and put them together you get a Nock
|
|
|
|
|
Hi
Here is link http://www.assol.mipt.ru/isr/catalog_en.html . Here if u click on an photo, a new page will be opened with that photo enlarged, and there u can choose textile material, color for that photo, and new photo is whith selected colors, textile is gained.
I just want u to show me the way, programming language(easy to write program analog to this),which programming section i should learn(image processing or something like this). I want to write program similar to this, but a desktop program,
Now i'm programming on C#.but have no idea,experience in image like programming
Thanks in advance
|
|
|
|
|
For the graphics, all of that can be done with GDI+[^]
which can be accessed in C# using classes in the System.Drawing Namespace[^].
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi
I am developing an application where i want to display live video and also do some image processing.
I tried:
1. Video for Windows API : easy but not quite comprehensive and not able to use overlay
2. 3rd Party SDK: nice quality still no overlay support, no single frame capture fn.!
3. GDI+ is an option but not quite preferable for fast video display and capture where I think DirectX goes well. Thus selected latest DirectX v9 which is latest for WinXP.
4. searched for DirecX but got DirectShow links which is deprecated in DirectX 9. also could not find suitable code for capturing single frame.
I've been searching for quite a while now. searched through CodeProject, MSDN, Google; but could not get exactly what i wanted.
Thus can you guide/suggest in the following area:
How to easily use DirectX 9.0 for displaying video from devices and capturing frames
I want to achieve this with very simple ( minimalistic) coding as i am beginner in this area and would not like to indulge with the complexity of DirectX (one of the most complex API's by Microsoft) for that purpose please suggest how to use Windows Media Player SDK or Windows SDX.
How to use DirectX 9.0 API's in -
1. Live video: display live video from digital camera / (analog camera + framegrabber card).
2. Overlay: displaying informative data over(on top of) the video (i guess this is what they call Overlay)
3. Capture Frame : capturing Current frame(image) for Image processing
platform: C#.NET, Visual Studio 2005, .Net Framework 2.0, WinXP Prof. SP2 on Pentium Core 2 duo 2GHz , 1GB Ram PC with Intel onboard graphics accelerator.
any help/suggestion or links highly appreciated ...
thanks.
|
|
|
|
|
LoneInvader2007 wrote: searched for DirecX but got DirectShow links which is deprecated in DirectX 9.
It's not deprecated. In fact DirectShow is so not deprecated
that its SDK was rolled into the platform SDK because it's a standard
part of the operating system.
The next generation (Vista+) Windows multimedia platform is Media Foundation[^]
You are, of course, free to use whatever capture and render methods you choose...
just keep in mind DirectShow has taken care of a LOT of the render/capture work
for you
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
@ Mark Salsbery
- Thanks for your reply.
Mark Salsbery wrote: DirectShow has taken care of a LOT of the render/capture work
provided DirectShow is well documented/supported on MSDN or elsewhere;
can DirectShow help in drawing graphics over the video (live video from camera)?
As these lines from Wikipedia Article http://en.wikipedia.org/wiki/DirectShow[^] imply it does'nt -
"Windows XP introduced a new filter called the Video Mixing Renderer 7 (VMR-7 or sometimes just referred to as VMR). The number 7 was because VMR-7 only used DirectDraw version 7 to render the video and did not have the option to use GDI drawing. The main new feature of VMR-7 was the ability to mix multiple streams and graphics, allowing applications to draw text and graphics over the video "
due to WinXP OS constraint, Thus I selected Direct3D (DirectX 9) over previous DirectDraw and DirectShow. (added to it the complexity of DirectX and the simplicity of me as a beginner in this field , i would really prefer the Managed DirectX or XNA as these API's provide simplified access through .NET.
keeping in mind that my current application is a machine vision application which only demands simple video capture display and capturing single frames for Image Processing.
For DirectX, web is full with help/guidance for game development and no such serious help is available for unique applications such as this one.
Thread like this is pretty much needed for such type of applications which will then prosper on DirectX technology.
On behalf of many I have just started the thread. I request everyone to take a note of this and contribute to this thread by answering the questions raised here and similarly wherever.
Thanks.
any help/guidance/feedback will really be appreciated
Question:
How To use DirectX 9.0 For Machine Vision Application:
How to use DirectX 9.0 API's in -
1. Live video: display live video from digital camera / (analog camera + framegrabber card).
2. Overlay: displaying informative data over(on top of) the video (i guess this is what they call Overlay)
3. Capture Frame : capturing Current frame(image) for Image processing
platform: C#.NET, Visualt Studio 2005, .Net Framework 2.0, WinXP Prof. SP2 on Pentium Dual Core 3GHz PC with Intel on-board graphics accelerator.(graphics card can be considered for DirectX)
|
|
|
|
|
LoneInvader2007 wrote: can DirectShow help in drawing graphics over the video (live video from camera)?
Yes. Whether it does what you need it to do or not, I don't know.
I do know Wikipedia isn't the ultimate source of info on DirectShow.
Using the Video Mixing Renderer[^]
Rendering is just one part. Acquisition also need to be considered.
Does the device have a WDM driver? If you've got capture covered already,
you can do rendering however you want to.
I personally use DirectShow for capturing from WDM and legacy VFW devices.
I do my own custom rendering for drawing on the video frames before they are
rendered, using GDI, not Direct3D (I personally found no benefit from the added
complexity of Direct3D, since all I'd use it for is back-buffers that don't need
to be on hardware).
The DirectShow SDK is freely available and includes enough sample code to create working
apps by mostly copy/paste - check it out, see if it's what you need.
Use whatever is best for your application.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: Yes. Whether it does what you need it to do or not, I don't know.
I do know Wikipedia isn't the ultimate source of info on DirectShow.
Thanks for your recommendation. application needs basic drawing on the live video display.
thanks for the msdn link, how could'nt i get that link
need to check.
will convey the status...
meanwhile (if there is a need for a good text) could you suggest a good one for DirectShow 9
|
|
|
|
|
LoneInvader2007 wrote: could you suggest a good one for DirectShow 9
I'm still using the Server® 2003 R2 Platform SDK[^]
but the newest SDK is the Windows SDK[^].
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi
very interesting thread about DirectShow,
I really liked it;
I myself use Platform SDK 2003, don't you think Microsoft to make the DirectShow as a separate SDK, they are moving it from DirectX SDK to Platform SDK now in Windows SDK. Because for newer people it is sometimes awkward to see this that DirectShow is being placed here and there. And our newsgroups are swarming with questions like,
DirectShow is not in DirectX SDK ?
Where to find DirectShow SDK ?
Which version to use ?
Another thing is this that they are not calling it deprecated, but behaving like that, I think so. Although I myself still programming in DirectShow.
thanks for the patience.
|
|
|
|
|
Moving the DirectShow SDK is definitely awkward.
I'm not sure what the benefit was supposed to be,
but it was moved and that's where it's at.
All we can do is spread the word.
tanvon malik wrote: they are not calling it deprecated, but behaving like that,
I would say "matured", not deprecated. There's no further
development going on for pre-Vista OS versions, so continued
development will be for the new technologies introduced in Vista.
Microsoft Media Foundation[^] is the next generation
Cheers,
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
LoneInvader2007 wrote: due to WinXP OS constraint
What do you mean? Do you need to support OS versions
older than XP?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: What do you mean? Do you need to support OS versions
older than XP?
Application needs to be developed only for Win XP variants and not targeting any other versions of Windows.
Platform is as specified below:
platform: C#.NET, Visual Studio 2005, .Net Framework 2.0, WinXP Prof. SP2 on Pentium Dual Core 3GHz PC with Intel on-board graphics accelerator.(graphics card can be considered for DirectX)
I will see if there is a Managed way (XNA, Managed DirectX) since that (managed code) will be better for the .NET application we are developing. Need to check if XNA can be used for DirectShow 9 (i guess not).
|
|
|
|
|
LoneInvader2007 wrote: the complexity of DirectX (one of the most complex API's by Microsoft)
Nah. The mixer APIs are infinitely more of a PITA to work with
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hey guys, first post on the forums (Hopefully I'm posting in the right section). I'm fairly new to the Direct3D World, so I'm making the "Hello world" program (aka, the rotating triangle).
Well, I wanted to take it a bit further, and rotate my triangle on the Y axis, but translate the position using the mouse position. For instance, if my mouse was at screen coordinates, (15,15), I would want the triangle to rotate, with the top point of the triangle at the coordinates (15,15).
The problem is:
POINT pos;
GetCursorPos(&pos);
D3DXMATRIX Trans;
D3DXMatrixTranslation( &Trans,(FLOAT)pos.x,(FLOAT)pos.y, 0.0f);
Doesn't work in screen coordinates .
How can I do this? Thanks!
|
|
|
|
|
clicking select one point on the screen as the start point, the moving mouse on the screen as the end point, how to draw the line with the two points dnamically using OpenGL,every moment of the mouse moveing,there is only one line drawed and displayed on the screen.
thanks.
|
|
|
|