Bitmap manipulation from VBA/VB

G

Guest

I am needing to load a bitmap, then run through some code that would
transform the image by looking at each pixel's color and if the RGB is less
than 10,10,10 then change the pixel to some other color. How do I do this?
Is there some kind of object I can use that will allow changing this from
VB/VBA?
 
G

Guest

I followed the link for the API calls. I found some more info on how to use
API from VBA (see link below). I am still confused on how the API calls will
relate to the VBA code......
ActiveSheet.Pictures.Insert( _
"C:\Documents and Settings\JKeith\My Documents\My Pictures\test.bmp" _
).Select
Selection.ShapeRange.IncrementLeft 108
Selection.ShapeRange.IncrementTop 91.5
Selection.ShapeRange.IncrementRotation 60
Selection.ShapeRange.ScaleHeight 0.65, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleWidth 0.65, msoFalse, msoScaleFromTopLeft

Do the API calls for SetPixel directly change the BMP file? (so I would do
all the API calls before I "insert" the picture into the spreadsheet?)

Is there some way to assign the API picture handle to the pictures.insert?
or will this have to be done externally?

For anyone that is looking to find out how to call API from VBA.... (this
link is for you)
http://www.awprofessional.com/articles/article.asp?p=366892&rl=1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top