Cropping image parts through list of lists
- To: mathgroup at smc.vnet.net
- Subject: [mg130130] Cropping image parts through list of lists
- From: TDMF HT <tdmfhtyoutube at appletv.cc>
- Date: Wed, 13 Mar 2013 04:18:48 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
Newbie with OOP way of thinking, so bear with me :) Thank you !
Given - list of lists:
myList = { { {0,100},{50,100},{800,600} } , { {{100,100},{150,100},{1024,768} } }
Using the above list of lists, I want to crop two different parts from a single image an resize the resulting partial image in the following way;
Cropped image 1:
cropXY: 0,100/50,100
resize: 800,600
Cropped image 2:
cropXY: 100,100/150,100
resize: 1024,768
My OOP way of thinking tells me to iterate/loop over the outer and inner lists.
This doesnt seem to be the Mathematica way, so I spent the last couple of hours messing around with
DO/TAKE etc. and all image related functions.
I dont seem to find the right way to sequentially go over the inner lists and crop/resize the two parts from the single image.
Id really appreciate a few tips on how to get this done.
Thanks a bunch !!!!