5
Parzi
216d

For once, I broke something intentionally.

Comments
  • 1
    So u just put in too large of an image?
  • 2
    @shoop here's the kicker though: some stuff opens it, some doesn't. Firefox will open ones under 21 million tall, most editors won't until under 1 million (ImageMagick stops at 2 million so it's not even consistent), Chrome just doesn't ever try...
  • 1
    @Parzi 32 million times 32 million is like 10^15 bytes which is like 1000 gigabytes which won't fit in memory. So it depends on how the image is loaded into RAM.
  • 3
    @shoop 32 million tall, 1 wide.
  • 1
    @Parzi oh, perhaps it stores the height as a list of widths, is it has to create an array 32 million long which won't fit. Idk
  • 1
    @shoop maybe like this
    @highlight
    //firefox
    ArrayLenth = (image.height < image.width ? image.height : image.width);
    Pixels = new byte[ArrayLenth]();

    //others
    Pixels = new byte[image.height]();
  • 2
  • 1
    @highlight For some reason, that image made me want to get up and code.
  • 2
  • 2
    @p100sch Apparently Chrome and Chromium won't render it but Edge will, despite being Chromium-based now... i don't think pseudocode's gonna explain that one xD
  • 1
    @c3r38r170 that's a bot, mate. It's actually really useful. Make sure you find the thread to select the color scheme for when you use it...
  • 1
    @Parzi I did, quite cool indeed!
Add Comment