Carving an image into rectangular chunks.

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15498
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Carving an image into rectangular chunks.

Post by ChrisGreaves »

(Correct Forum?)
I have in mind to write a little application that will take an image (typically a photo in JPEG format), and then carve it into a set of rectangular blocks.
The image might be carved into 3 rows and 4 columns, yielding 12 blocks.
Around each block would be a border, and this would represent "lost parts" of the image.
Think of it as carving a 3-foot by 4-foot poster into a series of 8.5 inch x 11 inch picture frames, such as can be found at no dollar store for a dollar anymore.

There is going to be some "loss" of image in the thin strips that constitute the picture frames borders.

I can write VBA, after a fashion.

Is there a program out there that either
(1) talks with VB/VBA?
or
(2) accepts a script file (which I could generate in VBA)?

I would offer the application an image and then a series of "top, left, height, width" measurements to define each small element.

I read through "Two "Photo Stitching" Programs" and "Making a pic dynamically?" but didn't see anything close.
An expensive day out: Wallet and Grimace

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Carving an image into rectangular chunks.

Post by HansV »

Perhaps you already have an application that does this. My Dell came with Roxio PhotoSuite10. Among the special effects is Puzzle Grid:
Tinnahinch.jpg
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

User avatar
jonwallace
5StarLounger
Posts: 1118
Joined: 26 Jan 2010, 11:32
Location: "What a mighty long bridge to such a mighty little old town"

Re: Carving an image into rectangular chunks.

Post by jonwallace »

And I was going to suggest something hi-tech like paint.net and its scriptlab plugin...

But Hans' solution seems easier...

disclaimer: I've not tried either method...
John

“Always trust a microbiologist because they have the best chance of predicting when the world will end”
― Teddie O. Rahube

User avatar
stuck
Panoramic Lounger
Posts: 8127
Joined: 25 Jan 2010, 09:09
Location: retirement

Re: Carving an image into rectangular chunks.

Post by stuck »

going off at a tangent...
http://www.dhteumeuleu.com/wander/

Ken