Results 1 to 9 of 9

Hybrid View

  1. #1
    I am in Jail

    Join Date
    Aug 2007
    Last Online
    12-09-2008 @ 02:41 PM
    Posts
    367

    Dynamic re-sizing of posted images

    I seem to recall that BBCODE image tags (just like HTML tags) support the dynamic resizing of images. All that's required is the addition of two additional keywords & associated values in the image tag itself.

    The regular IMG BBCODE tag goes something like this (minus the dots at the start & end):

    Code:
    [.img]https://teakdoor.com/images/smilies/dtroll.jpg[/img.]
    To dynamically resize an image, the BBCODE tag should goe something like this (minus the dots at the start & end):

    Code:
    [.img width=100 height=100]https://teakdoor.com/images/smilies/dtroll.jpg[/img.]
    But for some reason the second example doesn't work here However it does work at the Ajarn etc.

  2. #2

    R.I.P.


    dirtydog's Avatar
    Join Date
    Jun 2005
    Last Online
    @
    Location
    Pattaya Jomtien
    Posts
    58,763
    We haven't added the tags to the database, dynamic resizing slows down page loading times, it's better people learn how to resize pictures before they upload them to a server.

    As you only have 2 pictures in the gallery why would it worry you?
    Last edited by dirtydog; 30-08-2007 at 12:20 PM.

  3. #3
    I am in Jail

    Join Date
    Aug 2007
    Last Online
    12-09-2008 @ 02:41 PM
    Posts
    367
    Quote Originally Posted by dirtydog View Post
    We haven't added the tags to the database, dynamic resizing slows down page loading times, it's better people learn how to resize pictures before they upload them to a server.
    No tags in DBase, that explains it. I wonder which is the quicker, people using the tag options mentioned to resize the pics. on the fly or the message board auto. sizing large pics. (assuming you have an auto rezie code implemented here).

    Quote Originally Posted by dirtydog View Post
    As you only have 2 pictures in the gallery why would it worry you?
    I would have thought that was obvious. If I could resize on the fly, I wouldn't need to download them into an image editor, resize them & then upload them into the gallery. I think I only use the gallery to host pics. that I've modifed in some way, which has the added benefit to the TD as I take up less space.

  4. #4
    Thailand Expat

    Join Date
    Jun 2005
    Last Online
    05-12-2007 @ 03:50 AM
    Location
    Gropecvnt Lane Bkk
    Posts
    1,476
    ^ ^^ antediluvian

    today we got this

    Advanced Photo Resizing - CollegeHumor video

  5. #5

    R.I.P.


    dirtydog's Avatar
    Join Date
    Jun 2005
    Last Online
    @
    Location
    Pattaya Jomtien
    Posts
    58,763
    Quote Originally Posted by FatBoyEric
    I wonder which is the quicker, people using the tag options mentioned to resize the pics. on the fly or the message board auto. sizing large pics. (assuming you have an auto rezie code implemented here).
    If you think about it you will be able to work it out, 10 seconds to resize a picture or a batch, so thats 10 seconds of one persons time, say 100 people look at the picture and it hasn't been resized but is using resize tags, bit more than 10 seconds for those 100 people added together, would you set up a website or page and use resize tags for the pictures? or would you load the pictures at the size you wanted in the first place? The less queries on the server the quicker things run and load.

  6. #6
    I am in Jail

    Join Date
    Aug 2007
    Last Online
    12-09-2008 @ 02:41 PM
    Posts
    367
    Quote Originally Posted by dirtydog View Post
    Quote Originally Posted by FatBoyEric
    I wonder which is the quicker, people using the tag options mentioned to resize the pics. on the fly or the message board auto. sizing large pics. (assuming you have an auto rezie code implemented here).
    If you think about it you will be able to work it out, 10 seconds to resize a picture or a batch, so thats 10 seconds of one persons time, say 100 people look at the picture and it hasn't been resized but is using resize tags, bit more than 10 seconds for those 100 people added together, would you set up a website or page and use resize tags for the pictures? or would you load the pictures at the size you wanted in the first place? The less queries on the server the quicker things run and load.
    I would probably set up a website that:

    1) Invited interested parties to resize before posting, using whatever s/w was at their disposal.

    2) Implement some gobal code that auto-resized images that were potentially a stretch threat to the site.

    3) Permit the BBCODE resize tags, as I don't believe they can be exploited as some HTML tag options can be.


    If you were really interested in page load times, then you'd implement an image thumbnail option.


    -->


    Quote Originally Posted by lom View Post
    Quote Originally Posted by FatBoyEric
    I think I only use the gallery to host pics. that I've modifed in some way, which has the added benefit to the TD as I take up less space.
    That's another reason for not implementing auto-resizing.
    Why waste server space on megabyte pictures if they only will be displayed as a 150 kilobyte?
    If you re-read my post, you will note that I wasn't advocating using the gallery to host megabyte pictures, quite the reverse in fact. I suggested dynamically resizing them as they were served from a different source, e'g' google images etc.

  7. #7
    Thailand Expat lom's Avatar
    Join Date
    Jan 2006
    Last Online
    @
    Location
    on my way
    Posts
    11,453
    Quote Originally Posted by FatBoyEric
    I think I only use the gallery to host pics. that I've modifed in some way, which has the added benefit to the TD as I take up less space.
    That's another reason for not implementing auto-resizing.
    Why waste server space on megabyte pictures if they only will be displayed as a 150 kilobyte?

  8. #8

    R.I.P.


    dirtydog's Avatar
    Join Date
    Jun 2005
    Last Online
    @
    Location
    Pattaya Jomtien
    Posts
    58,763
    The main forums for traffic and pictures are the building and travel forums, I aint gonna bother working out the figures but lets say most people view 15 posts per page, the average first page has say 10 pictures, we know it's a lot more than that but 10 is a nice figure to work with, the average first page gets 100 views, we know its more than that but again its a nice figure to work with, so lets times 10 by 100 resizes on the server, thats a lot of queries that don't really need to be there, every month the forum gets bigger database wise and page hit wise, so those resizes would occur more and more often, at present we get about 1,000,000 page hits per month so it wouldn't worry the server cpus that much, but, it will get to the stage when it is using too much resources and then what do we do? Better to avoid getting to this situation in the first place I think.

  9. #9
    Northern Hermit
    friscofrankie's Avatar
    Join Date
    Jul 2005
    Last Online
    @
    Location
    Chiangmai, Thailand
    Posts
    7,526
    Resizng a pic on the fly you stil lhave th efull large pic size to serve and for the borwser to download the pic is then resized according to directives by the browser. Waste of bandwidth but it can allow people to download full-sized resolution pictures. There is another way that is more processor intensive using the gdi libs to dynaically resize a pic EACH TIME it is loaded. This serves a smaller less shape picture but keeps keeps bandwidth usage down.
    On some (most with pic uploads) sites I have written I put a 50K limit on size, and sometimes allow the user to upload an outsized (WxH) picture and resize it for them to standard maximum width if it is over.

    The very best way to serve pictures is to serve them as they are no processing for shrinking no wasted bandwidth for large pics that will be browser resized .

    It would be nice if there was an online cropper and resizer built into the upload software, it would be nice if pics over 600px wide were automatically resized for the uploader. But you can do these things faster and with better results in just about any picture viewer.
    I would discourage any of my customers from using a dynamic resize or serving full size pictures that are browser resized according to tag attributes. Big waste of resources. Busy sites can be slowed down considerably or page loads would be horrendous.
    When the people fear their government, there is tyranny; when the government fears the people, there is liberty -- T. Jefferson


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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