homepage Welcome to WebmasterWorld Guest from 54.83.133.189
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Accredited PayPal World Seller

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Uploading image to a container with fixed dimensions
Anjali




msg:4474899
 7:26 am on Jul 12, 2012 (gmt 0)

Hi,

CSS and Javascript can be used.

We want to upload an image in a container with fixed dimensions (height and width).

There are many conditions:

1) if the image is larger than the container, then it should ask the user to crop the image according to the dimensions of the container.

2) if the image is of same dimensions - then will upload properly.

3) if the height is more, and width less - then the image will be uploaded vertically center aligned.

4) If the height is less and width more - then the image will be uploaded horizontal center aligned.

5) If the height and image is less - then the image should be center aligned.

 

Anjali




msg:4474902
 7:37 am on Jul 12, 2012 (gmt 0)

Please can anyone help in this case.

Thank you in advance!

rainborick




msg:4475011
 3:11 pm on Jul 12, 2012 (gmt 0)

Since you'll need server-side software to allow users to upload images to your website, it's probably best to use a script that will automatically resize the images to suit your needs. I'm sure that if you search for an image upload script that you'll be able to find one that will do the job.

Anjali




msg:4475238
 4:14 am on Jul 13, 2012 (gmt 0)

Thank you for your reply Rainborick. But please can you help me in this case as well as I am totally a fresher person. Thank you in advance!

Kendo




msg:4475241
 4:23 am on Jul 13, 2012 (gmt 0)

If your site is on a Windows server you will need a DLL installed on the server and usually the licence needs to be purchased. Some Windows web hosts already include them in their offerings, otherwise a DLL may not required if your site is on an Apache server. The significance of the DLL is that it will require administrator rights on the server, usually from the owner of the server.

Looking though the list of goodies available for Wordpress, Joomla or Drupal I did see a module that can be used for what you want. Those modules are usually free.

Anjali




msg:4475244
 4:32 am on Jul 13, 2012 (gmt 0)

Thank you Kendo! Actually, I need the code for my requirement on urgent basis.

tedster




msg:4475258
 5:01 am on Jul 13, 2012 (gmt 0)

Hello Anajali, and welcome to the forums.

This is a major coding request to ask for free - and it also goes far beyond HTML, the topic for this forum. If you can't locate a free image uploader script online that will do the job you need, then I think you'd better hire a coder.

rainborick




msg:4475259
 5:05 am on Jul 13, 2012 (gmt 0)

As long as you have PHP installed on the server, no DLLs would be required.

I'd write the script for you (by modifying one of my existing scripts, actually) but I don't have the time right now. But I found plenty of scripts with a Google search of "image upload script resize". Good luck!

Anjali




msg:4475269
 5:41 am on Jul 13, 2012 (gmt 0)

Thank you so much for your replies!

I got my answer!

Thank you again!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved