Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".

I am rather busy right now. Perhaps I can try this weekend. But perhaps you should process each cuff separately using similar type operations as you did with the shirt body. You may have to tune the processing separately for each cuff. You need to add a shading image by processing the mask image. As I recall you do that by composition --

convert image shadingimage -compose hardlight -composite result

But you may have to process the hardlight image first with -auto-level, or -contrast-stretch 0, so that the average graylevel is mid gray and you have both darks and lights.

# line1: read pattern and mask images
# line2-3: rotate 80 deg and crop pattern for left side of image cuff
# line4: extract alpha channel from mask for left side of image
# line5: delete temp images
# line6: make clones of previous two images and put mask as alpha channel with left side pattern
# line7-8: rotate 90 deg and crop pattern for right side of image cuff
# line9: extract alpha channel from mask for right side of image
# line10: make clones of previous two images and put mask as alpha channel with right side pattern
# line11: delete pattern and temp images
# line12: clone the two half images and append
# line13: delete temp images
# line14: clone the mask image and process to reduce brightness
# line15: delete mask and use compose hardlight to add shading from the mask onto the cuffs

Another possibility is to curve the pattern so it runs parallel to the edge of the cuff. I follow the upper edge. It would be just as easy to follow the lower edge, or an average of the two edges. (Windows BAT scripts. Adjust for other languages.)

The same trick could be applied to the sleeves, collar and front panels. Each one needs a mask that effectively defines the displacement, and creating this automatically in the general case is difficult. It would be a pain for thousands of blank (greyscale) shirts. But if there was one blank and thousands of cloth patterns, the same displacement (and shading) would be used for each.