Solved

Conform picture to 8x12 format

Posted on 2011-03-09
1
244 Views
Last Modified: 2012-06-22
I've used some of the PHP image functions and have been quite impressed.  I was wondering if it could help me with this project.  I have .jpg files all of different sizes and proportions.  I need to print them all on 8x12 prints.  What I have been doing is using my calculator and enlarging the canvas and adding black bars where space needs to be filled, so that it fulfills the 8x12 ratio.

I can't help but think this could be done programatically using PHP.
0
Comment
Question by:hrolsons
1 Comment
 
LVL 34

Accepted Solution

by:
Beverley Portlock earned 500 total points
ID: 35087987
If you can work out the pixel size then you can use the image resize routine in the question below to ensure that your resized image fits within the pixel sizes for your image

http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_24935011.html#25924977

Adding the borders would be a matter of calculationg two rectangles in the appropriate places and filling them with black (or white)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now