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.

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 22
  1. #1
    Member
    Join Date
    May 2008
    Posts
    65
    Member #
    16874
    Hey Everyone,
    My client wants this plane image as watermark/background. It should be centered under the header and the content centered also. I can't seem to figure out how to make it fit any screen. How do you set it up so the plane and copy will re-size with any size screen? Here is the link:
    http://www.bluecatgraphics.com/aesurveyors/index.html

    Thanks for your help and time,
    MJ

  2.  

  3. #2
    Senior Member Dorky's Avatar
    Join Date
    Jun 2009
    Location
    Destin Florida
    Posts
    1,430
    Member #
    19103
    Liked
    4 times
    you could use flash or a combination, javascript to find screen res then to php-gd for image resizing then to output. the combo sounds like a lot but it would still render in less then one second, way faster then flash.

    while($get_it !== true){ continue; }

  4. #3
    Senior Member Dorky's Avatar
    Join Date
    Jun 2009
    Location
    Destin Florida
    Posts
    1,430
    Member #
    19103
    Liked
    4 times
    if someone would donate the javascript to find screen res and pass to a php var i would gladly donate a php resizing script.

    while($get_it !== true){ continue; }

  5. #4
    Senior Member Steax's Avatar
    Join Date
    Dec 2006
    Location
    Bandung, Indonesia
    Posts
    1,207
    Member #
    14572
    I just don't think it's worth it. Besides, it would either take AJAX or a double page load. Resizing a raster image will break it and considerably reduce the quality.

    MaryJo, I would recommend to go with what you're already using. Tell your client that forcing the effect would put extra load on the server and cause a fair amount of quality loss.

    (Dorky, in case you still want it, use jQuery to fetch $(window).width() and .height(), and put them into the URL as GET parameters.)
    Note on code: If I give code, please note that it is simply sample code to demonstrate an effect. It is not meant to be used as-is; that is the programmer's job. I am not responsible to give you support or be held liable for anything that happens when using my code.

  6. #5
    Senior Member Dorky's Avatar
    Join Date
    Jun 2009
    Location
    Destin Florida
    Posts
    1,430
    Member #
    19103
    Liked
    4 times
    (Dorky, in case you still want it, use jQuery to fetch $(window).width() and .height(), and put them into the URL as GET parameters.)
    hey cool. i don't know js but i do know php-gd and it wont distort the image. it can be done in one page load using the xml socket to send the var back to the index.

    while($get_it !== true){ continue; }

  7. #6
    Senior Member Steax's Avatar
    Join Date
    Dec 2006
    Location
    Bandung, Indonesia
    Posts
    1,207
    Member #
    14572
    XML socket? You mean AJAX, and yes, that's one page load, but it still puts load on the server. Anyway, they should be cached, because you don't want the images continuously being resized on demand... And someone could probably bring down your server in a hurry by requesting that AJAX over and over quickly.
    Note on code: If I give code, please note that it is simply sample code to demonstrate an effect. It is not meant to be used as-is; that is the programmer's job. I am not responsible to give you support or be held liable for anything that happens when using my code.

  8. #7
    Senior Member Dorky's Avatar
    Join Date
    Jun 2009
    Location
    Destin Florida
    Posts
    1,430
    Member #
    19103
    Liked
    4 times
    you don't want the images continuously being resized on demand
    How do you set it up so the plane and copy will re-size with any size screen?
    i'm sorry steax but that is what the client is asking for if need be.

    And someone could probably bring down your server in a hurry by requesting that AJAX over and over quickly.
    you're referring to a DOS bomb. that is the concern of the host. if a designer is running their own server without protection from such they shouldn't be running their own server. chances are they are on a commercial host that has a safe guard for this. when i offer suggestions that have a security potential i offer it with the suggestion but i do not assume the position of thinking for them. simplify and offer a solution based on what they are looking for. not guide them away from it because they need looking after. they are grown.

    while($get_it !== true){ continue; }

  9. #8
    Senior Member Steax's Avatar
    Join Date
    Dec 2006
    Location
    Bandung, Indonesia
    Posts
    1,207
    Member #
    14572
    Despite protection from the server, it's still necessary for the programmer to take preemptive measures against potential attacks. We can't leave a window open and hope the security system will catch anyone who tries to climb in anyway.

    A cache will reduce the server load considerably, though.

    I'm just recommending for MaryJo to talk about it with the client. From how she said it, she doesn't seem to know about the complexity behind it (probably expecting a single CSS background property or something).

    Come to think of it, that is an option. z-index an img element behind everything else and set the dimensions in JS. Would probably still be pretty ugly though.
    Note on code: If I give code, please note that it is simply sample code to demonstrate an effect. It is not meant to be used as-is; that is the programmer's job. I am not responsible to give you support or be held liable for anything that happens when using my code.

  10. #9
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    MaryJo,
    Leaving that background image alone is the best solution.
    Talk your client into not worrying about the resizing.
    Most people (at home) have larger monitors and don't care about it anyhow.

    Since they are a service company, I would finish the website you started and
    then work with your client on some PDA (small screen, smart phone), browser
    applications. In their industry, I'm guessing most of their clients will NOT be
    using desktop PC, nor laptops. They are people "on the go" and will want to
    quickly access their client/business information on a PDA/Smart Phone of some kind.

    Small, simple screens, where they log in, and have quick access to their profiles,
    accounts, and status of service from your client's database. They give your client
    a service to perform, and they need to know when it's "ready", "finished", "shipped",
    etc. No need for a website ... in fact, you don't really need any website for those clients.

    That's the direction of tomorrow's internet, Web3.0 ... whatever you want to call it.
    It's my opinion that only a small percentage of their clients will even care about
    accessing their site on a desktop PC.


  11. #10
    Senior Member Dorky's Avatar
    Join Date
    Jun 2009
    Location
    Destin Florida
    Posts
    1,430
    Member #
    19103
    Liked
    4 times

    $file = "path/to/file.jpg"; //set path to image

    $save = "path/to/temp/file.jpg"; //set this to a path for the temp image. you don't want to overwrite the original

    $modwidth = $passed_var; //set this to the var passed by the javascript

    list($width, $height) = getimagesize($file) ;

    $diff = $width / $modwidth;
    $modheight = $height / $diff;

    $tn = imagecreatetruecolor($modwidth, $modheight) ;

    if( $extension == "jpg" || $extension == "jpeg" ) { $image = imagecreatefromjpeg ($file); }
    if( $extension == "gif" ) { $image = imagecreatefromgif ($file); }
    if( $extension == "png" ) { $image = imagecreatefrompng ($file); }

    imagecopyresampled($tn, $image, 0, 0, 0, 0, $modwidth, $modheight, $width, $height) ;

    if( $extension == "jpg" || $extension == "jpeg" ) { imagejpeg($tn, $save, 100) ; }
    if( $extension == "gif" ) { imagegif($tn, $save, 100) ; }
    if( $extension == "png" ) { imagepng($tn, $save, 9) ; }
    you can remove the lines with image types you aren't using. not sure why the the pressure to talk you out of your goal but here is the php-gd resize. this really isn't that complicated nor does it present an increased security risk. if i knew the js to get the screen res i would give you a full script solution.

    while($get_it !== true){ continue; }


Page 1 of 3 1 2 3 LastLast

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
  •  

Search tags for this page

css background image behind text scalable

,

scalable text in html

Click on a term to search for related topics.
All times are GMT -6. The time now is 10:28 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com