Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Php :: Image Pixel Per Inch And Conversion, Please Guide
Zeeshan Hashmi
post Sep 24 2006, 06:16 AM
Post #1


Newbie [ Level 2 ]
Group Icon

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 !!!!!!!
Go to the top of the page
 
+Quote Post
CrazyPensil
post Sep 29 2006, 03:05 PM
Post #2


Member [ Level 1 ]
Group Icon

Group: Members
Posts: 42
Joined: 17-March 06
From: Russia, St.Petersburg
Member No.: 12,058



QUOTE(Zeeshan Hashmi @ Sep 24 2006, 10:16 AM) *

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
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Php: Write Random Text As Image(3)
  2. Is It Possible To Create A String Image In Chinese(0)
  3. Saving A Php Generated Image To The Server(5)
  4. How Do I Make PHP Based Image Gallery Like This?(20)
  5. Uploading Image Via Admin Menu?(2)
  6. How Do I Resize An Image On The Fly?(8)
  7. Script For Viewing A Random Image Needed(3)
  8. Php :: Adding Image Over Image(5)
  9. Image Works With Php And Gd(3)
  10. Need Help With Background Image...(12)
  11. Image Popup On Mouseover(23)
  12. Dynamic Gd Image(2)
  13. Dynamic Php Image And Better Php Code Question(10)


 



- Lo-Fi Version Time is now: 22nd November 2008 - 02:42 PM