Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 8th, 2003, 12:43 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: Mentiri, Muara, Brunei.
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default Dynamic Image

Dear friends,

i am having a problem in designing a T-Shirt based on the measurements given as input. The procedure is like..

one t-shirt requires 2 mts of cloth. so they cut it into collar, hands, main body with minimum measurements, according to the client's requirements. since he is
maintaining a database of the material available with him, he wants to computerize this
operation also, to make life easier for the cutting dept people. once they enter the details of the sizes, measurements like 20 cm length, 25 cm width, curvature of 45 degrees angle etc etc...the system should design a prototype with the given measurements, just to depict it to the cutting supervisor, how the image will be after cutting. he will make a print out of it and attatch that to the lot, which is being forwarded to the cutting dept. so they follow exactly the same measurements using it. he has the required infrastructure already for that like HP designjet printer etc. now, practically, they are doing it manually. this is the case.

My problem is how to design an image at runtime based on the measurements. Its a very serious problem. Plsss help me.

URGENTTTTTTT

Thanks in advance
  #2 (permalink)  
Old October 8th, 2003, 02:10 AM
Friend of Wrox
Points: 2,570, Level: 21
Points: 2,570, Level: 21 Points: 2,570, Level: 21 Points: 2,570, Level: 21
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: San Diego, CA, USA
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This really isn't a PHP issue as much as it is a mathematics issue. I'm assuming that the cut pieces are all similar to each other -- that is, they're all the same shape, all angles are the same, all curves are the same, and the ratio of all lenths are the same.

That said, the image generating function doesn't really need to generate a new image for every size, but needs to calculate the new lengths to be cut to make the same design.

So that means that if your Medium size is 10% larger than your small size, then all your curves and angles are the same, and all your sides are 10% longer.

You can use the same cutout base image and just generate new length text onto that image using the gd image creation and manipulation library extension.
  http://www.php.net/image


Take care,

Nik
http://www.bigaction.org/


Similar Threads
Thread Thread Starter Forum Replies Last Post
grab dynamic image microbytes VB How-To 2 June 30th, 2008 08:21 PM
Dynamic image button Angel6784 ASP.NET 2.0 Basics 2 August 2nd, 2006 01:25 PM
dynamic changing of image pandad BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 0 January 5th, 2006 12:55 AM
Dynamic Image Update aymawadi ADO.NET 1 April 10th, 2005 04:53 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.