SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot JagXJ220's Avatar
    Join Date
    Mar 2001
    Location
    Not worth the drive
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have a script where it makes cool looking thumbnails of my images, and then displays them. It works fine, but I think it's pretty server intensive to generate thumbnails each time a visitor goes to the page. I want the images to automatically save themselves once they're turned into thumbnails, and then each time the script is called, it will first check and see if the thumbnail exists. If it doesn't, it'll make one and save it, and if it does exist, it will simply display the thumbnail from the server. Anyone have any ideas on how I'd go about doing this?

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    uhhhmmm....put the thumbnail in a variable and save it to your database in a thumbnail field? When you insert a new image into your database set the thumbnail field to null, then after you query your database for the thumbnails and before you ouput the individual thumbnail, check to see if the field is equal to null. If it is null, generate the thumbnail from the image and put it in a variable, save the variable in the database, and then output the variable.

    Why not just make the thumbnails with a graphics program?
    Last edited by 7stud; May 20, 2001 at 22:51.

  3. #3
    SitePoint Zealot JagXJ220's Avatar
    Join Date
    Mar 2001
    Location
    Not worth the drive
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't really understand how to use images in databases. Is there a tutorial or something on this, or is there another way of saving the thumbnails to the server? The reason I'm not just making the images on my computer and uploading them is because there are about 2800 photos that need thumbnails to be created, and I don't want to manually edit every single photo to make thumbnail images.


Bookmarks

Posting Permissions

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