Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Member ThePhoenix2006's Avatar
    Join Date
    Mar 2005
    Location
    Michigan
    Posts
    88
    Member #
    9431
    Hello everyone,

    I have a question concerning uploading images. Is there a certain way to submit it via form? Also I would like it to be put in a certain area of a page that I made so that would need to be resized into a certain width.

    I was also wondering if there was a script that pulls a picture form that table and auto-crops it so they can see a small pic (thumbnail).

    Anything you can do to help would be greatly appreciated. I wasnt sure if this was the right area to post this thread in.

    THANKS! :laugh:
    "Make sure the juice is worth the squeeze" ~The Girl Next Door

  2.  

  3. #2
    Senior Member
    Join Date
    Jul 2005
    Location
    S.Wales, UK
    Posts
    250
    Member #
    10742
    What language will you be coding in? ASP, PHP

    PHP can upload and resize with just code, ASP can upload with code but resizing requires a component on your server.

    Pure html cannot upload and resize. You need a server sided language to grab the image from the form and process it.
    Paul Creedy
    Visit my community site at: www.rhonddacynontaff.com
    My hosting: www.rcthosting.com
    My Content Management product: www.dynamiccontenteditor.com

  4. #3
    Member ThePhoenix2006's Avatar
    Join Date
    Mar 2005
    Location
    Michigan
    Posts
    88
    Member #
    9431
    Quote Originally Posted by Mr C
    What language will you be coding in? ASP, PHP
    I am using PHP and mySQL.
    "Make sure the juice is worth the squeeze" ~The Girl Next Door

  5. #4
    Senior Member
    Join Date
    Jul 2005
    Location
    S.Wales, UK
    Posts
    250
    Member #
    10742
    My knowledge php is limited, but I believe you can upload with php up to 2mb in size. You can resize images using the php GD extension.

    A search in google about using the GD extension may turn up some results.
    Paul Creedy
    Visit my community site at: www.rhonddacynontaff.com
    My hosting: www.rcthosting.com
    My Content Management product: www.dynamiccontenteditor.com

  6. #5
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    There are tons of different examples of upload scripts through a Google search.

    With regard to storing the image in a table, I would not reccomend that.
    BLOB's (Binary Large Objects) will bloat tables and make them slow. It's better to store the uploaded/resized images in a normal folder, and just store a reference to them in the MySQL table. That way your table will respond fast and regurgitate a common <a href> to the folder where the images are stored.

    You can combine your upload script with an image resize script that scales down the images to a predefined value, before copying them to the designated folder. You could even make the script downscale to two sizes, where one would be a thumbnail version copied to a designated thumbnail folder.

    I tinkered a bit with this a while ago, and there's an example script (resize) here.
    There might be quicker compiled code, but it works and produces high quality images.

    If you don't want to tinker with the code, there are a lot of free album scripts out there, that can be presentationally modified to suit your needs.
    S. Rosland


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:48 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com