Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Bitmap manipulation from VBA/VB

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/articl...?p=366892&rl=1

--
Regards,
John


"K Dales" wrote:

You can do this if you use Windows API functions; here is a reference for the
Bitmap functions (note in particular GetBitmapDimensionEx and
GetPixel/SetPixel):
http://msdn.microsoft.com/library/de...tmaps_87eb.asp
If you are not familiar with using API library functions you may want to
search the MSDN libarary on the topic.
--
- K Dales


"John Keith" wrote:

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?

--
Regards,
John

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bitmap Ed Excel Discussion (Misc queries) 2 January 26th 07 02:12 AM
background bitmap washouts CraigL Excel Discussion (Misc queries) 0 August 1st 06 05:30 PM
Bitmap Macca Excel Programming 0 October 26th 04 09:43 AM
bitmap for buttons Sarah Davies Excel Programming 1 November 26th 03 02:56 PM
bitmap for buttons Sarah Davies Excel Programming 1 November 26th 03 01:15 PM


All times are GMT +1. The time now is 12:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"