|
|
|
|
![]() ![]() |
Sep 24 2006, 06:16 AM
Post
#1
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 24 Joined: 17-September 06 Member No.: 15,982 |
Hi Masters
I want soemone to let me know (maybe through a good tutorial and/or PHP Sample Code) the following : 1 - User will only allowed to upload images with minimum 120 and maximum 300 Pixel Per Inches 2 - User will only allowed to upload JPG images, however, if Gif / BMB / PNG / ETC is uploaded the script will convert that into jpg. 3 - If the Image's PPI is > 300 it will set to 300. Please guide . I know this can'y be done by GD it requires ImageMagick, Pleae help !!!!!!! |
|
|
|
Sep 29 2006, 03:05 PM
Post
#2
|
|
|
Member [ Level 1 ] Group: Members Posts: 42 Joined: 17-March 06 From: Russia, St.Petersburg Member No.: 12,058 |
1 - User will only allowed to upload images with minimum 120 and maximum 300 Pixel Per Inches 2 - User will only allowed to upload JPG images, however, if Gif / BMB / PNG / ETC is uploaded the script will convert that into jpg. 3 - If the Image's PPI is > 300 it will set to 300. GD Library: As your script uploads it, you make following: resource imagecreatefromjpeg ( string filename ); //if it's not jpeg - there may be gif/png/etc bool imagecopyresampled ( resource dst_image, resource src_image, int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h ); bool imagejpeg ( resource image [, string filename [, int quality]] ); Don't have time now, gonna write others a bit later. This post has been edited by CrazyPensil: Sep 29 2006, 04:45 PM |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 22nd November 2008 - 02:42 PM |