Image Resize & Rotation

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
infoseeker
Forum Newbie
Posts: 2
Joined: Tue Mar 04, 2008 10:56 am

Image Resize & Rotation

Post by infoseeker »

Hi

I have 2 scripts, one for Image rotation and other image resize and they both are working.

Image resize scripts load the picture and resize it to "Thumbnail" and Image rotation rotate the image by 90 deg. They are two differennt files i.e. resize.php and rotate.php.

What I want to do is to combine both rotate.php & resize.php, so when the scripts resize the image than it calls rotate script to rotate the image and display it on the screen.. I hope I am making sence.. I am finding hard to explain.. If u dont understand anything please let me know..

thanks
Zee
Last edited by infoseeker on Wed Mar 05, 2008 3:51 am, edited 1 time in total.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Image Resize & Rotation

Post by pickle »

Put the logic from rotate.php into resize.php. I imagine you send the filename to both scripts & let them do their magic. Have this master file open the image & resize it - but rather than write the file back to disk, just hold onto the image resource & let the rotate stuff do it's thing. You can then take out the logic from resize.php that opens the file.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
infoseeker
Forum Newbie
Posts: 2
Joined: Tue Mar 04, 2008 10:56 am

Re: Image Resize & Rotation

Post by infoseeker »

Thanks I ll give it a go
Post Reply