Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
| FAQ | Members List | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #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.


Thanks in advance
Reply With Quote
  #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

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.

Take care,

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 04:52 AM.

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