You are asking if you can extract the dragon shape (and the dragon picture itself) from an image.
Right now, I don't know. If I figure it out I will let you know
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
I would think it's for a mask of some kind or a shadow image
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
OK, something I don't understand. Let's say you are able to extract out the shape of the dragon then where are you going to put it? It's going to have to be another image (picturebox or image control, or as a StdPicture in a variable). But in order to see this shape you will need to put it in a control.
Is the dragon image the only image in the picture? Are the pixels that surround the dragon all same color?
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
As it is possibly do-able but might need a bit of knowledge or 3rd party controls. I use simply use PhotoShop (or similar) and use the magic selection tool! One click and your done.
Just an idea, if background color (white) is all the same color (white) maybe setting all other pixels that are not background color black let's say.
Than your dragon will be black and background white.
Sorry if this is impossible for your case, but I would think something like this is do-able.
Kind of like doing a transparent background, you know!
Maybe even some api can do it for you, mask your image.
As it is possibly do-able but might need a bit of knowledge or 3rd party controls. I use simply use PhotoShop (or similar) and use the magic selection tool! One click and your done.
Just an idea, if background color (white) is all the same color (white) maybe setting all other pixels that are not background color black let's say.
Than your dragon will be black and background white.
Sorry if this is impossible for your case, but I would think something like this is do-able.
Kind of like doing a transparent background, you know!
Maybe even some api can do it for you, mask your image.
maybe i can't express me better(sorry) to both..... i did it before using the bitblt(), but by mistake... i need that for do a Transparency Opacity(instead by pixels).. need speed or i still get flickers. and a need speed for capture a form\container(inclued the controls).
Your 1st post states how to extract the shape of a dragon from an image. Your other posts are referring to the fact that you cannot express or explain it correctly. Is all you want to know is how to extract the shape?
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
Your 1st post states how to extract the shape of a dragon from an image. Your other posts are referring to the fact that you cannot express or explain it correctly. Is all you want to know is how to extract the shape?
yes, but using bitblt().
(because i need speed)
Last edited by joaquim; Mar 17th, 2013 at 05:05 PM.
OK, you want to extract a shape (a dragon but I assume there may be other shapes) from an image using BitBlt for speed reasons. How this will be done depends on the image itself. I need to see the image
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
OK, you want to extract a shape (a dragon but I assume there may be other shapes) from an image using BitBlt for speed reasons. How this will be done depends on the image itself. I need to see the image
just the shape. the dragon is just a sample
thanks for all
Even with BitBlt it will cause flicker! I have done this before, the only way would be using some like DirectX. There is a way to make it with BitBlt without any flickering (I think). You will have to load the images to another picturebox (invisible or offscreen) and replace it with that one, what I mean is that you need to preload the image to another picturebox to remove the flickering which is caused by masking images (when you place a masked image, then the transparent picture on top). If you only paint on a picturebox over and over with BitBlt, it will cause the flickering once in a while!
I might be wrong on this but I have tried this in the past without success (using BitBtl and one picturebox).
If anyone has a example without any kind of flicker I would also like to use it on some of my projects!
Edit:
Ok I have found an old project, might not be the best. Might need some improvement. I did not fix anything I just zipped it and attached it, now it's up to you to see if BitBlt works .
Hopefully you find out why in my project it still had the flickering! I know I should not have put Timer Interval = 1 but that way its as fast as it can go.
Last edited by Max187Boucher; Mar 17th, 2013 at 07:49 PM.
Even with BitBlt it will cause flicker! I have done this before, the only way would be using some like DirectX. There is a way to make it with BitBlt without any flickering (I think). You will have to load the images to another picturebox (invisible or offscreen) and replace it with that one, what I mean is that you need to preload the image to another picturebox to remove the flickering which is caused by masking images (when you place a masked image, then the transparent picture on top). If you only paint on a picturebox over and over with BitBlt, it will cause the flickering once in a while!
I might be wrong on this but I have tried this in the past without success (using BitBtl and one picturebox).
If anyone has a example without any kind of flicker I would also like to use it on some of my projects!
Edit:
Ok I have found an old project, might not be the best. Might need some improvement. I did not fix anything I just zipped it and attached it, now it's up to you to see if BitBlt works .
Hopefully you find out why in my project it still had the flickering! I know I should not have put Timer Interval = 1 but that way its as fast as it can go.
if you put the land together with that tower and then draw it... goodbye flicker
the isn't what i need.. but thanks anyway