Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Conform picture to 8x12 format

Posted on 2011-03-09
1
Medium Priority
?
251 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

927 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