|
-
Apr 19th, 2002, 12:49 PM
#1
Thread Starter
Frenzied Member
StretchBlt
hey Everyone
I know this has been posted before, but I could not find it on the search (wierd...)
so could anyone pls tell me what I need to do in order not to get the ugly colorproblems and artifacts or whatever when using strechtblt? there was an alternative right??
thanks
Sanity is a full time job
Puh das war harter Stoff!
-
Apr 19th, 2002, 01:07 PM
#2
Hi, the function just copies one DC to another. If you are running
into color problems maybe its the way the source DC was drawn?
If you used a function like StretchDIBits () I know the
'BITMAPINFO' parameter has to be passed in as a pure byte
array; otherwise, it's 'RGBQUAD' member may be at a different
address and cause color problems during a blit operation. Of
course I could be way off on my understanding of what you
are trying to accomplish 
-CC
-
Apr 19th, 2002, 01:13 PM
#3
Thread Starter
Frenzied Member
well I solved my problem some sloppy way already...
well I just used StretchBlt... (If I would have had time I would have done it a cleaner way... oh well)
strangely enough it screws up when I make pictures smaller they start looking crappy.... I just blt from one picbox to another
I thought I could get that problem fixed with StretchDiBits, while skimming through the registry I saw something like it wont support w95... bad enough I did that little program for someone using w95... oh well I hope it works...
the controls do support jpg in w95 though right???????
Sanity is a full time job
Puh das war harter Stoff!
-
Apr 19th, 2002, 01:25 PM
#4
Yep, they do support win95 (for VB6). for VB.Net, I am not sure...
I heard a rumor that MS no longer supports 95 with their
software (and .Net would be within that decision time frame).
-CC
-
Apr 19th, 2002, 02:06 PM
#5
Thread Starter
Frenzied Member
yeah well but does vb support the jpeg under w95 (I know it should, but the rumor you were talking about is pretty true..)
I really don't understand why microsoft does that (i.e DirectX8 does not work on 95 anymore... you can't tell me architecture is to different from w98...)
thanks for the help!
Sanity is a full time job
Puh das war harter Stoff!
-
Apr 20th, 2002, 04:22 PM
#6
PowerPoster
Originally posted by /\/\isanThr0p
well I solved my problem some sloppy way already...
well I just used StretchBlt... (If I would have had time I would have done it a cleaner way... oh well)
strangely enough it screws up when I make pictures smaller they start looking crappy.... I just blt from one picbox to another
I thought I could get that problem fixed with StretchDiBits, while skimming through the registry I saw something like it wont support w95... bad enough I did that little program for someone using w95... oh well I hope it works...
the controls do support jpg in w95 though right???????
Misanthrop,
I too have the same problem with StretchBlt when scaling images down.
Could you please tell me how you got around it and also the cleaner way you would have used?
If you can help me fix this, I'll love you forever!!!
Gentile or Jew,
O you who turn the wheel and look to windward,
Consider Phlebas, who was once handsome and tall as you...
-
Apr 21st, 2002, 04:42 AM
#7
Thread Starter
Frenzied Member
Hey Arbiter.
Even though the prize is high I can't help you... (as of now)
the way I used you really don't want to know it is so sloppy programming that I feel ashame of it
well if you really wanna know I used the image control set the stretch property to true and well you can figure the rest....
but what exactly do you need? I might be able to help you. Does it need to be as fast as StretchBlt or would something little slower work for you too?
Sanity is a full time job
Puh das war harter Stoff!
-
Apr 21st, 2002, 04:55 AM
#8
PowerPoster
Though it pains me to do so, I'll have a whizz with the image control and see if I can get some decent speed out of it.
If you have any other suggestions though, I'm all ears...
Gentile or Jew,
O you who turn the wheel and look to windward,
Consider Phlebas, who was once handsome and tall as you...
-
Apr 21st, 2002, 05:08 AM
#9
Thread Starter
Frenzied Member
well as of right now It does not work for me, but I still think it might work for you... to bad I can't take credit for it anyways (maybe you could still love me if it works )
take a look at the high quality image resizing at www.ur.co.nz
Sanity is a full time job
Puh das war harter Stoff!
-
Apr 21st, 2002, 08:49 AM
#10
PowerPoster
Umm.... I'm struggling with this image control thing.
It's probably only something dead simple. I've moved the graphic to the image control with the stretch set to true, so it's shrank it.
Beautiful.
Now, how do I get it out again at that size? If I reference its picture property it pulls it out at its full size, same if I save it.
Any ideas?
Gentile or Jew,
O you who turn the wheel and look to windward,
Consider Phlebas, who was once handsome and tall as you...
-
Apr 21st, 2002, 09:07 AM
#11
Thread Starter
Frenzied Member
Sanity is a full time job
Puh das war harter Stoff!
-
Apr 21st, 2002, 09:37 AM
#12
Thread Starter
Frenzied Member
haha you wont believe it but the paintpicture method does it all without any flaws love me now?
Sanity is a full time job
Puh das war harter Stoff!
-
Apr 21st, 2002, 10:22 AM
#13
PowerPoster
That depends.
I've just spent the last 3 hours writing a linear resizing function, and now you tell me that paintpicture solves all my problems.
PAINTPICTURE!!!!!
DAMNIT ALL TO HELL AND BACK ON A BOAT!!!
*ahem*
I'd totally forgotten about paintpicture.
I'll have a play and post back.
Thanks pal!
Gentile or Jew,
O you who turn the wheel and look to windward,
Consider Phlebas, who was once handsome and tall as you...
-
Apr 21st, 2002, 10:44 AM
#14
-
Apr 21st, 2002, 11:36 AM
#15
Thread Starter
Frenzied Member
LOL
well happy that I could give you the needed idea...
and hey it's one line of code so it at least does look like good programming might not be the most efficient way though but oh well
Sanity is a full time job
Puh das war harter Stoff!
-
Apr 21st, 2002, 03:07 PM
#16
PowerPoster
Misanthrop...
If you want to see where the resize is being used then download the latest version of Sentience....
http://www.vbforums.com/showthread.p...097#post949097
(blatant plug).
The RMV underneath the headquarters is the resized version, right click on it and click show mech (or whatever) and you'll see the full size version.
Thanks again for your help..
Gentile or Jew,
O you who turn the wheel and look to windward,
Consider Phlebas, who was once handsome and tall as you...
-
Apr 21st, 2002, 03:30 PM
#17
Thread Starter
Frenzied Member
well I am happy that I could help you, but I am not sure if I am gonna take a look at sentience right now... I haven't played any turn based strategy game except for fallen haven and if you know that one you know that it does not have any complexity...
well I will take a look in time
Sanity is a full time job
Puh das war harter Stoff!
-
Apr 21st, 2002, 03:35 PM
#18
PowerPoster
Take a look whenever you like. There's no great rush.
You're just missing out on the best VB game in the world ever...
Gentile or Jew,
O you who turn the wheel and look to windward,
Consider Phlebas, who was once handsome and tall as you...
-
Apr 21st, 2002, 03:41 PM
#19
Thread Starter
Frenzied Member
well I haven't seen many games except for sentience that really had something more compelling than just a great concept (normaly someone else already came up with years ago) like tetris and snake (hey I made a great snake game !!). I mean those games are cool, but everyone could make those. Do you know of any other big game projects done in VB?
Sanity is a full time job
Puh das war harter Stoff!
-
Apr 21st, 2002, 03:52 PM
#20
PowerPoster
Not really.
There the Times Of War project going on, but the bulk of that appears to be in C++.
I don't think many people have the guts to try and write a full game in VB....
Gentile or Jew,
O you who turn the wheel and look to windward,
Consider Phlebas, who was once handsome and tall as you...
-
Apr 22nd, 2002, 06:45 AM
#21
Thread Starter
Frenzied Member
I think it's because of the slow string and array operations and the lack of inheritance...
Still I think it can be done in VB. As of right now, I don't have the time to dive that deep into vb... I am just doing tiny things like my little CD-database and even tinier tools for single use pretty much...
After this year I am thinking about starting something. I will have about 4 month that I will be able to spend lots of time, than I will have my finals so I wont have any time for about 3 month and than there is going to be about 1.5 years of time I could use... so I got to start planning and getting skills..
Sanity is a full time job
Puh das war harter Stoff!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|