Image too large? Give a link!

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default Image too large? Give a link!

    Hello,

    I have a forum with a function that if an image is larger as xxx the forum
    will give a link to the image. But it doesn't work... :-S

    Could anyone see what i have done wrong?

    Thanx, Arjan

    You can see the forum at: [url]http://members.lycos.nl/wbdf/wbdfforum/index.php[/url]
    Function image-part of the full script:

    function image_control ($url, $myfont, $mycolor5) {
    $image_size = @getimagesize($url);
    $image_width = $image_size[0];

    if ($image_width > 600) {
    $value = $image_width / 600;

    $image_height = $image_size[1];
    $image_height = round ($image_height / $value);

    $image = "<center><a href=$url target=_blank><img src=$url width=600
    height=$image_height border=1></img></font><font face=$myfont
    color=$mycolor5 size=1><br>Klik om te vergroten</font><font face=$myfont
    color=$mycolor5 size=2></a></center>";
    }

    else {
    $image = "<img src=$url border=1></img>";
    }

    return $image;
    }



    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system ([url]http://www.grisoft.com[/url]).
    Version: 6.0.504 / Virus Database: 302 - Release Date: 24-7-2003


    Volhouden Guest

  2. Similar Questions and Discussions

    1. Thumbnail to large image
      How do I create a rollover effect where on mouse-over a thumbnail image will display a larger image: on top; to the side? Thanks for your help in...
    2. ASP thumb to large image
      I have an ASP page that presents the results of a query. The page gives from every found record normal data but also an image. This is a thumbnail....
    3. large image db delemia
      I have a camera system (Axis) which stores JPG via FTP 1-10fps. There is also a motion jpg live stream. I am trying to store these images either...
    4. Can I take a small (320x240), blurry image, and make it a clear, large image?
      Just wondering if there is an easy way to do this? I'm sure it won't be perfect cause photoshop can only work with what's there, but maybe it can...
    5. Image Too Large problem
      Clint, Might I ask what computer you are using ? I am routinely working on large files - 800MB to 1.6Gb, and my Photoshop Scratch file size...
  3. #2

    Default Re: Image too large? Give a link!

    Volhouden wrote:
    > Hello,
    >
    > I have a forum with a function that if an image is larger as xxx the forum
    > will give a link to the image. But it doesn't work... :-S
    >
    > Could anyone see what i have done wrong?
    >
    > Thanx, Arjan
    >
    > You can see the forum at: [url]http://members.lycos.nl/wbdf/wbdfforum/index.php[/url]
    > Function image-part of the full script:
    >
    > function image_control ($url, $myfont, $mycolor5) {
    > $image_size = @getimagesize($url);
    > $image_width = $image_size[0];
    >
    > if ($image_width > 600) {
    > $value = $image_width / 600;
    >
    > $image_height = $image_size[1];
    > $image_height = round ($image_height / $value);
    >
    > $image = "<center><a href=$url target=_blank><img src=$url width=600
    > height=$image_height border=1></img></font><font face=$myfont
    > color=$mycolor5 size=1><br>Klik om te vergroten</font><font face=$myfont
    > color=$mycolor5 size=2></a></center>";
    > }
    >
    > else {
    > $image = "<img src=$url border=1></img>";
    > }
    >
    > return $image;
    > }
    Try changing $image = "<img src=$url border=1></img>";
    to
    $image = "<img src='$url' border=1>";
    or
    $image = "<img src=\"$url\" border=1>";

    --
    From the mind of Andrew Kicks
    Remove nospam to reply

    Kicksy Guest

  4. #3

    Default Re: Image too large? Give a link!

    > Try changing $image = "<img src=$url border=1></img>";
    > to
    > $image = "<img src='$url' border=1>";
    > or
    > $image = "<img src=\"$url\" border=1>";
    Thanx for repling...

    But he already show the picture, but the problem is that if the image is
    larger as 600 pix he should give a link to the image instead of showing
    it....

    And now he still showing the pic:
    [url]http://members.lycos.nl/wbdf/wbdfforum/index.php?cat=8&topic=1&page=4[/url]

    "Kicksy" <slapkicksy@noblueyonderspam.co.uk> schreef in bericht
    news:jR2Xa.1201$hz2.13582546@news-text.cableinet.net...
    > Volhouden wrote:
    >
    > > Hello,
    > >
    > > I have a forum with a function that if an image is larger as xxx the
    forum
    > > will give a link to the image. But it doesn't work... :-S
    > >
    > > Could anyone see what i have done wrong?
    > >
    > > Thanx, Arjan
    > >
    > > You can see the forum at:
    [url]http://members.lycos.nl/wbdf/wbdfforum/index.php[/url]
    > > Function image-part of the full script:
    > >
    > > function image_control ($url, $myfont, $mycolor5) {
    > > $image_size = @getimagesize($url);
    > > $image_width = $image_size[0];
    > >
    > > if ($image_width > 600) {
    > > $value = $image_width / 600;
    > >
    > > $image_height = $image_size[1];
    > > $image_height = round ($image_height / $value);
    > >
    > > $image = "<center><a href=$url target=_blank><img src=$url width=600
    > > height=$image_height border=1></img></font><font face=$myfont
    > > color=$mycolor5 size=1><br>Klik om te vergroten</font><font face=$myfont
    > > color=$mycolor5 size=2></a></center>";
    > > }
    > >
    > > else {
    > > $image = "<img src=$url border=1></img>";
    > > }
    > >
    > > return $image;
    > > }
    >
    >
    > --
    > From the mind of Andrew Kicks
    > Remove nospam to reply
    >

    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system ([url]http://www.grisoft.com[/url]).
    Version: 6.0.504 / Virus Database: 302 - Release Date: 24-7-2003


    Volhouden Guest

  5. #4

    Default Re: Image too large? Give a link!

    Volhouden wrote:
    >>Try changing $image = "<img src=$url border=1></img>";
    >>to
    >>$image = "<img src='$url' border=1>";
    >>or
    >>$image = "<img src=\"$url\" border=1>";
    >
    >
    > Thanx for repling...
    >
    > But he already show the picture, but the problem is that if the image is
    > larger as 600 pix he should give a link to the image instead of showing
    > it....
    >
    > And now he still showing the pic:
    > [url]http://members.lycos.nl/wbdf/wbdfforum/index.php?cat=8&topic=1&page=4[/url]
    ok, sorry

    <snip rest of code>

    $image = "<center><a href=\"$url\" target=_blank>Words for link go
    here</a></font><font face=$myfont
    color=$mycolor5 size=1><br>Klik om te vergroten</font><font face=$myfont
    color=$mycolor5 size=2></a></center>";
    }

    else {
    $image = "<img src=\"$url\" border=1></img>";
    }

    return $image;
    }

    is that what your looking for?


    --
    From the mind of Andrew Kicks
    Remove nospam to reply

    Kicksy Guest

  6. #5

    Default Re: Image too large? Give a link!

    > is that what your looking for?

    It doesn't work :-S


    "Kicksy" <slapkicksy@noblueyonderspam.co.uk> schreef in bericht
    news:kd3Xa.1217$Ax2.13563087@news-text.cableinet.net...
    > Volhouden wrote:
    >
    > >>Try changing $image = "<img src=$url border=1></img>";
    > >>to
    > >>$image = "<img src='$url' border=1>";
    > >>or
    > >>$image = "<img src=\"$url\" border=1>";
    > >
    > >
    > > Thanx for repling...
    > >
    > > But he already show the picture, but the problem is that if the image is
    > > larger as 600 pix he should give a link to the image instead of showing
    > > it....
    > >
    > > And now he still showing the pic:
    > > [url]http://members.lycos.nl/wbdf/wbdfforum/index.php?cat=8&topic=1&page=4[/url]
    >
    > ok, sorry
    >
    > <snip rest of code>
    >
    > $image = "<center><a href=\"$url\" target=_blank>Words for link go
    > here</a></font><font face=$myfont
    > color=$mycolor5 size=1><br>Klik om te vergroten</font><font face=$myfont
    > color=$mycolor5 size=2></a></center>";
    > }
    >
    > else {
    > $image = "<img src=\"$url\" border=1></img>";
    > }
    >
    > return $image;
    > }
    >
    >
    >
    > --
    > From the mind of Andrew Kicks
    > Remove nospam to reply
    >

    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system ([url]http://www.grisoft.com[/url]).
    Version: 6.0.504 / Virus Database: 302 - Release Date: 24-7-2003


    Volhouden Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139