View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
onceuponatime onceuponatime is offline
external usenet poster
 
Posts: 3
Default Intelligent picture cropping

I hope someone can help me. I've read the posts on how to
programatically crop pictures in Excel through VBA. I would like to do
this based on where I have image data in a picture making the following
assumptions.

1. Picture is pre-loaded into in a shape range object.
2. Image itself is a picture surrounded by a lot of the same color. eg
A multicolored ball surrounded by Green pixels.

I would like to traverse the pixels from left to right, right to left,
etc. As soon as green is not detected, I would like to signify this as
the top, left, etc. boundary so that when I crop, only the image itself
is isolated. Once I know these boundaries, I can use the cropping
function in VBA to finish the job.

Any help would be greatly appreciated!