|
Here[^] is an MSDN forum entry that talks about a blue "halo" around images and an admitted bug in the GetHBITMAP function. It is dated from May 2005 so one would figure there would be a fix by now. I will keep looking.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Thanks for the link!
I would guess it's a pretty simple bug to fix - maybe it doesn't get reported.
It may not be often that we (programmers) need a HBITMAP from a Gdiplus::Bitmap.
Still, I never know - I may want to do it tomorrow and it's not going to work
One reply so far on the MS GDI board but it wasn't useful.
Thanks for the update!
Mark
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Here[^] is some code someone did to fix the problem. Search for
"FixedGdipCreateHBITMAPFromBitmap" on the page to find it
Not necessarily useful - just FYI.
Mark
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
|
Thank you! I am SO glad someone else argued with him - I know that's where it was
going in my thread on MSDN (with the same guy!).
Anyway, did you draw any conclusion from all that?
Mark
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Mark Salsbery wrote: Anyway, did you draw any conclusion from all that?
Yeah, that that guy is extremely stubborn
If he is right, and the result we are seeing is the expected result, then the designers of GetHBITMAP should be shot as it makes absolute no sense.
I think I will just use my workaround as all I have been able to find on the subject is some people complaining about the bug, but no one being able to point to a hotfix or easy to implement solution (hooking the Gdiplus dll is not an easy solution).
I will continue to watch these threads but I will not hold my breath waitng for a solution.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
BTW, I am using version 5.1.3102.2180 of the gdiplus.dll file.
I do not know if that makes a difference.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
My first guess would be the SetFromCOLORREF method. Try passing in a ARGB defined color, and also try using one of the other c'tors. I have a feeling that internally the color is screwed up before your call to get the bitmap.
Can you see the internal members of the color object in the debugger and verify that it is set up correctly?
|
|
|
|
|
In my original post I checked the Color object at the point labeled "b:" just before the call to GetHBITMAP() and as far as I can tell by looking in the debugger the values are set properly. It does not change after the call to GetHBITMAP() yet the colour in the final bitmap is always wrong.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
strange. Out of curiosty, try grabbing a few pixels from the bitmap, just on the offchance it's being corrupted while being sent to your ImageViewer ( highly unlikely I know ). Other from that I can't think of anything.
|
|
|
|
|
Is it possbile to select a DIB in a window DC and use
normal drawing functions like Rectangle, Ellipse ..
How?
Balu Chettri
|
|
|
|
|
|
Hey Jeremy LTNS
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
|
|
|
|
|
Howdy howdy.
I think I found my new home on the Internet. If I end up getting into flame wars over something like OpenGL, then I must say there's no hope for me.
|
|
|
|
|
Well it's good to see you back here. Didn't know you personally but I always enjoyed,
respected, and learned something from your posts in the past.
Cheers!
Mark
mental note - start opengl flame war in the future, just for fun
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
|
|
|
|
|
Mark Salsbery wrote: Didn't know you personally but I always enjoyed, respected, and learned something from your posts in the past.
Oh man, where did I go wrong?
Just kidding, thanks for the kind words.
|
|
|
|
|
Hi all, i have written a program using system timer, i configures system timer using outportb(portAdd, byte) for achiveing 1msec interval. i was trying to update on filled rectangle(moving) evry 20msec. sometimes if shows flikkering effect. can i solve this problem. can i synchronise rectangle plotting with monitor updation(vertical sync), HOW?
shri
|
|
|
|
|
The drawing operations usually can't keep up with the display when this happens. So, if you have the flickering issues you either need to A: slow down the animation or B: use double buffering by drawing to an off/memory buffer and the blitting that to the display so the delay isn't noticeable.
|
|
|
|
|
Oh wow, that's a trip back. If you're seriously doing DOS graphics programming, you might want to spend some time with the old Abrash columns[^]...
----
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
|
|
|
|
|
Define Crazy: I spent days and almost $100 trying to track down that black book w/ the CD in good condition. So, I get it and it sits collecting dust alongside my other books. But, it does look neato sitting there.
|
|
|
|
|
Heh.
I think i first read it in electronic form; it came on CD with The Zen of Graphics. Gosh, it's been probably ten years or more since i bought that book... loved it though; the guy can really write.
----
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
|
|
|
|
|
Oh yeah, and if I ever end up dumb enough to write video drivers in DOS, well I'm set - minus the whole I don't know ASM *that* well thing thugh.
|
|
|
|
|
hi all,
in my project i need to convert raw image to bmp or jpeg and i have some images with the extention .gry i dont know this is raw or any other special format but i am thinking this is a raw format so my problem is convert .gry image to bmp or jpeg in c#
so plz any one knows the way how to do it is plz tell me
thanks in advance
Regards,
santhosh
|
|
|
|
|
You could use the System.Drawing.Bitmap class to create a bitmap of the appropriate bits-per-pixel
and copy the raw pixel data to it.
Do you have specs for the gry file format?
Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
|
|
|
|
|
No mark i don't have any specs for that gry file according to my project document i have to take that gry image as input and displaying that into picture box
plz tell me the way how can i read this type of images in c#
and tell if any tutorial for this problem for reference
Regards,
santhosh
|
|
|
|