Solved

Conform picture to 8x12 format

Posted on 2011-03-09
1
246 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

828 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