An image can overflow

(master.dev)

60 points | by ibobev 5 days ago

4 comments

  • JimDabell 23 hours ago
    I’ve seen this used before to add a credit that only appears when you save the image. You append the credit to the bottom of the image, then crop the image with CSS using a technique like this to hide the credit. Then when somebody saves the image, they get the whole thing and the credit appears.
  • Imzadi72 16 hours ago
    Somewhat related, but back in the old days (maybe better to say early days) we used a different technique although purely for fun.

    Yes, you can clip an image, but you can also scale an image, making it half the size of the original. The fun-part is that Netscape Navigator would render all the even lines, and Internet Explorer rendered the uneven lines (or the other way around). Making the picture vendor-specific :-) Since almost all the current browsers use the same render-engine (and if not probably the library) you can make you image bigger and hide some watermark in the non-rendered pixels.

    • echoangle 4 hours ago
      > Since almost all the current browsers use the same render-engine (and if not probably the library) you can make you image bigger and hide some watermark in the non-rendered pixels.

      Probably not because current browsers probably resize the image using an interpolation algorithm that considers all pixels instead of just throwing away half the data.

  • philipov 1 day ago
    > Here is a demo where you can hover the image to show/hide the overflow:

    Is something supposed to happen when I hover my mouse over the image? Because nothing happens. I'm using Firefox.

    • deathanatos 1 day ago
      You should, I think, at that point be seeing a square image of a jellyfish inside a red square. The square should be containing the image. When you hover, it should reveal the rest of the jellyfish (the image itself is rectangular, and wider than it is tall).

      (I'm also using FF, and it works for me.)

      • LoganDark 1 day ago
        I'm using Safari on Mac and it also does not work for me.
      • philipov 1 day ago
        yeah, I see the square jellyfish image inside the red square, but nothing changes when I hover.
      • purpleshellx 1 day ago
        [dead]
    • bryanrasmussen 1 day ago
      I'm using Firefox dev, it overflows for me. Are you sure you didn't hover the earlier screenshot of the unhovered image inside the red square, as opposed to the image inside a codepen embed?
      • philipov 1 day ago
        Definitely using codepen. I can manipulate the scaling and view the html and css windows and stuff. I'm not using the latest firefox version, but it's not like this is a new feature right?
        • exploraz 23 hours ago
          Works for me on FF stable 148.0, 153.0.4, but does not with FF 145.
          • exploraz 23 hours ago
            Okay, I've figured it out, thanks to the "test distros online" thingy to test version 145 and 148 as I previously mentioned.[0]

            From Firefox 148 release notes for developers:[1]

            > The overflow, overflow-x, and overflow-y CSS properties can now be used on replaced elements such as images, in the same way that they are used with other elements. Prior to this, replaced elements were always clipped to their bounding container. (Firefox bug 1999100).

            [0]: https://news.ycombinator.com/item?id=49272986 [1]: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Rel...

  • inigyou 17 hours ago
    Broken link - it just says "403 Forbidden"
    • exploraz 17 hours ago
      Still working for me, your IP or browser request might be flagged by their firewall or anti-bot protection
    • ButlerianJihad 16 hours ago
      [flagged]
      • inigyou 16 hours ago
        I'd like to hear what behavior you imagine I've done.

        "This is a broken link" is not a "tangential annoyance" and is a valid reason for flagging. It's also appropriate to comment, so that the poster or moderator can fix the link.

        • hunter2_ 16 hours ago
          Perhaps the bad behavior is failure to remove a compromised (botnet) device on your network that has been attacking one or more sites that use a popular security solution.

          "Broken link" is not an accurate way to describe this situation.

          • exploraz 16 hours ago
            Other hypotheses:

            - VPN/Proxy/Datacenter IP/Tor usage

            - Censorship bypass tools triggering destination server's firewall (suspicious TLS fingerprint or connection characteristics, or bad proxy IP)

            - Bad ISP (e.g. one ISP IP address or range of addresses shared by so many users that could create collateral damage if one or more user gone rogue)

            - Actual botnet/hidden residential proxy exit node on the same IP/local network (e.g. TV boxes or SDKs embedded inside apps that users are not aware of)

            - Strict privacy settings (unlikely to cause 403 straight away), or obscure browsers (also unlikely, but can trigger firewall because of connection fingerprint/characteristics)

            - Actual bad behavior (scraping, etc)

            • hunter2_ 10 hours ago
              Your 4th hypothesis is equivalent, not "other," to mine. But I agree that it could be anything you mentioned, as all of them have crossed my mind as possible reasons why I experience "verifying you are human" and "find the motorcycles / busses / traffic lights" more often on my residential ISP than on my cellular or work ISPs, and the unknown botnet/exit node seems most probable (by far) when considering my own traffic. I never have the 403 problem discussed here, luckily.