|
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")
|
|
|
|
|
I apologize; at one time I was so used to dealing with raw DIBs that I forgot that they needed to be converted to a GDI DIB via CreateDIBSection, which converts a raw DIB to a DIB that the GDI recognizes, before it could be selected into a DC.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
No apology necessary for sure. I wonder what happened to the OP?
Cheers!
Mark
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
They often disappear after the original post. Some times they come back and say thanks and other times they just continue on with their lives, with a little more information.
I have been guilty of both!
P.S. I have been known to disappear for weeks!
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
Yes! A dib is just a bitmap and if your program can load it you can display it. The problems occur when it is not a dib (essentially a “.bmp”), in which case you will need to convert it using code like “CxImage” (at CP).
See LoadImage (MSDN).
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
Using DirectX.Capture I lately found out that there is a problem in Lip movement and voice synchronization, i.e. when I apply Video Compression and without applying audio compression, say for example Microsoft Video 1, I found out that the voice and the lip movement does not match, sometime the voice/sound came out after the lip movement or vice-versa. What is the problem with these and how do I solve this problem. I will be very happy to get answer for this query.
Thanks in advance.
Suan Ngaihte.
|
|
|
|
|
Using DirectShow?
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Is there a way to import an object created with a 3d-modeling program (ex. Google Sketchup) to an OpenGL application and use it?
If yes what file type must it be (.obj?) and how?
I'm new at this
|
|
|
|
|
Lampros G wrote: Is there a way to import an object created with a 3d-modeling program (ex. Google Sketchup) to an OpenGL application and use it?
In most cases people try not to reinvent the wheel, there are numerous tutorials on how to write a .obj loader for OpenGL to display it, even a couple that included material and surface normals. But then you get into rewriting what others have done for model loading for years. When you get to this point, I would recommend (you don't have to if you don't want to), switch to your openGL code on a higher level library/framework. This might be SDL, Open Scene Graph, Delta3D (highly recommended).
Just as an example, Delta3D is based on OpenSceneGraph which is based on OpenGL. It loads:
3dc
ac3d
directx
dw
flt
geo
Inventor
ive
lib3ds
logo
lwo
lws
md2
obj
osg
pfb
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
Is there any way to calculate gpu memory speed or its bandwidth.
i already know the formula but how to extract the values from the gpu? If anybody knows any method please reply.
|
|
|
|
|
Hello,
Please provide me some inforamation on how windows grapics system and mouse movement is mapped to each other? When we create a GUI using MFC how the mouse movements and MFC control gets mapped?
Plz help me
thanks in Advance
Bil
|
|
|
|
|
The mouse and it's position has nothing to do with MFC.
The mouse is controlled by the OS's kernel, raw input is recieved from the mouse, the kernel translates this information into something more meaningful, the kernel applies user settings, then the kernel will send a message to whichever window happens to be beneath the mouse.
Applications are only aware of what the kernel tells it about. If the mouse is not over the window, then the window recieves no messages. Take a look on MSDN for the mouse related windows messages.
|
|
|
|
|
WalderMort is correct in that you (we) do not need to know how it is done.
I am one of the few people who have created their own windowing system (before Windows existed) and the details do not matter.
Rethink your question, because this one does not provide enough information.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
Hello,
I have to create an application for a system which is haing 2 touch panles as display medium. The application gets controlled from 2 touch panles by 2 users. My application have many frmaes for different purpose. So 2 topuchpanels can have different frames or same frame at a time. I am developing this application using .Net framework in windowsXP embedded.
Please suggest me how to achieve it? While developing the application what all things I have to take care?How to display the frames in different touch panels from single application?
Plz help me..
Thanks in Advance
Bil
|
|
|
|
|
There's a class, I think it's called Screen, it has a property called AllScreens. This gives you the co-ordinates of all the different monitors on the system. As far as windows is concerned, those monitors all are part of one big canvas, you get the co-ordinates, and you draw to them, and each window has different ones. So, one may be 0, 0 to 800, 600 and the other may be 800, 0 to 1600, 600.
Multi monitor stuff is pretty easy, it's not really any different from having one monitor, except for having to iterate over them to position your screens initially.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
[ VC8 on XP SP2 ]
Hey All,
I am having a problem using Bitmap::GetHBITMAP when the image contained in the Bitmap object has a transparent colour. (ie an icon or transparent gif). It seems that no matter what I try I am only able to get the transparent colour to be drawn as a shade of blue.
Maybe I am misunderstanding the documentation, but this is what it says
Syntax
Status GetHBITMAP(
const Color &colorBackground,
HBITMAP *hbmReturn
);
Parameters
colorBackground
[in] Reference to a Color object that specifies the background color.
This parameter is ignored if the bitmap is totally opaque.
hbmReturn
[out] Pointer to an HBITMAP that receives a handle to the GDI bitmap.
Return Value
If the method succeeds, it returns Ok, which is an element of the Status enumeration.
If the method fails, it returns one of the other elements of the Status enumeration.
I read that as saying that colorBackground will be the colour that is used to fill the transparent parts of the image. But for some reason it does not work that way.
Here is my code (ShowGraphic is a function that displays images):
bool CImageViewerDoc::LoadImageFile(CString FilePath)
{
Gdiplus::Bitmap Image((LPCWSTR)CT2W(FilePath));
ShowGraphic(Image, _T("%s loaded into Gdiplus::Image"), FilePath);
HBITMAP bmp;
a: COLORREF BackGround = (COLORREF)AfxGetMainWnd()->SendMessage(WMU_GETBGCOLOUR, 0, 0);
Gdiplus::Color clr;
b: clr.SetFromCOLORREF(BackGround);
if (Gdiplus::Ok == Image.GetHBITMAP(clr, &bmp))
{
c: ShowGraphic(bmp, _T("%s in HBITMAP"), FilePath);
DeleteObject(bmp);
}
} As I step through the code with various background colours this is what I get:
a: Background b: clr c: Actual colour in bitmap
RGB(0, 0, 255) 0xff0000ff RGB(0, 0, 255)
RGB(0, 255, 0) 0xff00ff00 RGB(0, 0, 0)
RGB(255, 0, 0) 0xffff0000 RGB(0, 0, 0)
RGB(192, 192, 192) 0xffc0c0c0 RGB(0, 0, 192)
RGB(236, 233, 216) 0xffece9d8 RGB(0, 0, 216)
As you can see the red and green values I supply are ignored and set to zero and only the blue value is used is the final image.
Am I using the GetHBITMAP function incorrectly? or is the function simply broken?
BTW this code works perfectly if the image does not have any transparent bits.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|