Skip to main content
Participating Frequently
September 27, 2011
Question

VBS: Opening an image and cropping it into a hexagon

  • September 27, 2011
  • 1 reply
  • 2088 views

Hello,

I am working in VBS

I am supposed to compose several pictures next to each other in form of hexagons.

How do I open a file and crop it (and how could I set the exact position of the crop) ? i.e. I open a pic and want the script to crop that picture in a way that hexagon center matches the center of the picture?

And than, how can I make a batch of it (every time with a different picture)? Assuming all the pictures are in one folder?

Thank you in advance!

Petra

This topic has been closed for replies.

1 reply

Inspiring
September 27, 2011

Sorry but I don't do VB but heres the principle regardless of scripting language…

Place your file as is into the document…

Once placed get it's dimensions…

Use the path items polygon to create a hexagon to size…

Put this in front of the picture…

Group the 2 items…

Set clipping of the front item of the group to true… This becomes your clipped shape picture…

Participating Frequently
September 29, 2011

Thank you for the idea, I will try to solve it that way.

Still, I am not shure how can define a batch to all the files in the set folder?

And how can I even import an image into the document?

Inspiring
September 29, 2011

An reason for using VB?