Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Apr 2005
    Location
    Lahore, Pakistan
    Posts
    150
    Thanks
    2
    Thanked 0 Times in 0 Posts

    How to crop images (long height images and long width images

    Hello,

    I am working on a shopping cart, and i am facing a severe problem.
    I have two types of images to display at "PRoducts PAGE".
    i.e.

    1) Images that have long width but short height ( example= 500x275)
    2) Images that have long height but short width. (example =200 x 400 )

    I add products with images in shopping cart from admin panel of webiste. but when i see the images in client side it wont looks good , because some images have long height and some have long width, so i am unable to adjust the images properly.

    I want to automate this process when whatever image i can add from admin section , whether it has long height or whether it has long width, my code will automatically crop it, and adjust it, so that images displayed in client section have equal height and width.

    currently in my products page if i add one image which has long width and secondly i add image with long height then it disturbs the layout.

    so please please suggest me that what can i do to solve this problem

    thanks in advance

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,492
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    Is there a reason why you can't use a photo editor to create nice
    square photos (offline)? Something like SnagIt. You can crop and
    resize to make them square even before you upload them.

    That method is also better, because you can control where it's cropped.
    So, every photo you upload will be 200 X 200. You won't have to change
    anything with your shopping cart script.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •