Find Jobs
Hire Freelancers

Dynamic text resizing with PHP and GD

$25-30 USD

In Progress
Posted about 15 years ago

$25-30 USD

Paid on delivery
Quick project, need PHP and GD library expert. 1) Dynamically resize text string, display using ttf font with GD library 2) Create "text box", create function to allow placement in 9 spots within the image. See attached zip file for complete specification. Thanks. ## Deliverables This project consists of the following functions... 1) Dynamically resize text string, display using ttf font with GD library 2) Create "text box", create function to allow placement in 9 spots within the image. Item #1 Specification: ========================== I'm using PHP and GD library to resize an image, then placing a random string of text (ttf font) using GD functions within a "text box" on the image. The "text box" width should be calculated, then passed to the function I need created which will change the font size to allow the text to fit within a designated number of lines in this text box. This function needs to be able to work with many different ttf fonts and random text strings of varying lengths. The variable $max_text_rows will need to be passed to the function, so the text string will not exceed this number of rows based on the text box width. If it does exceed the rows and width at the default font size, then the font size needs to be decreased until it fits within the specified $max_text_rows. In addition, the function should also determine if the string of text fits within one line, that it checks to see if it is filling the full width of the text box. If it isn't, then increase the font size so the text goes the full width. I have not created this "text box" specifically. The idea behind the text box is that it will typically only cover two-thirds (2/3) of the image width and may be anywhere on the image. You will need to do this in conjunction with item #2 below. Item #2 Specification: ========================== Create a "text box" that takes up two-thirds of the image width, then based on which position is passed to the function, place the text box in that position. This "text box" is where the text string will be inserted based on item #1 above. The possible text box placement positions should be; top-left top-center top-right middle-left middle-center middle-right bottom-left bottom-center bottom-right The 2/3 width of the text box should be setup to allow this width to be changed and will be dependent on the overall image width. For example; when the script is run, sometimes the text box may need to cover 100% of the image width, whereas other times it might be 1/2 instead of the default 2/3. My initial script with all functionality except for items #1 and items #2 is attached in the zip file assigned to this project. Thanks in advance for your bid.
Project ID: 3794276

About the project

1 proposal
Remote project
Active 15 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$25.50 USD in 4 days
5.0 (4 reviews)
2.5
2.5

About the client

Flag of UNITED STATES
Portland, United States
5.0
18
Payment method verified
Member since Feb 2, 2007

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.