GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Tulip ?️‍⚧️ (domi@donotsta.re)'s status on Tuesday, 11-Feb-2025 07:45:00 JST Tulip ?️‍⚧️ Tulip ?️‍⚧️
    in reply to
    • Tulip ?️‍⚧️

    wrr, i hate self-referencing formats. wdym i need to know the data offset when writing the header out, i don’t yet know how long the header will end up being! /j

    In conversation about 3 months ago from gnusocial.jp permalink
    • Haelwenn /элвэн/ :triskell: likes this.
    • Embed this notice
      Tulip ?️‍⚧️ (domi@donotsta.re)'s status on Tuesday, 11-Feb-2025 07:45:01 JST Tulip ?️‍⚧️ Tulip ?️‍⚧️
      in reply to

      back to the encoder itself, I added some automata to convert the image size and count the cbSize (roughly).

      I also looked into what the extra fields right after this one do; unsurprisingly, most of them are special attributes, and at least one seems to be unused. Setting all of them to 0xffffffff results in this hilarious outcome:

      /dev/stdin: PC bitmap, Windows 3.x format, 32 x 32 x 4, 4294967295 compression, image size 4294967295, resolution -1 x -1 px/m, 4294967295 important colors, cbSize 1024, bits offset 120

      I especially like the “4294967295 important colors”, reads like a line from the BORN TO DIE template

      In conversation about 3 months ago permalink

      Attachments


      1. https://asdf.donotsta.re/media/60cc3e9a386e9f2f81fef3820ab086b2453101df7a16f35bc3ad8e152a978fa0.png
    • Embed this notice
      Tulip ?️‍⚧️ (domi@donotsta.re)'s status on Tuesday, 11-Feb-2025 07:45:02 JST Tulip ?️‍⚧️ Tulip ?️‍⚧️
      in reply to

      more feh weirdness: the arbitrary data leak only really happens with an image that’s 32x32. i can’t trigger it with anything else

      In conversation about 3 months ago permalink
    • Embed this notice
      Tulip ?️‍⚧️ (domi@donotsta.re)'s status on Tuesday, 11-Feb-2025 07:45:03 JST Tulip ?️‍⚧️ Tulip ?️‍⚧️
      in reply to
      • not good osdev 🏳️‍⚧️

      oh, better! it does check the value properly, but only the width. height can be negative.

      and oh my gosh @mothcompute was right. if I set the values to 0x20000000, 0xe0ffffff (32 x -32) then we get a flipped image, where the top of the file ACTUALLY is the top of the file!!

      … at least in GIMP and firefox. feh just ignores it

      In conversation about 3 months ago permalink

      Attachments


      1. https://asdf.donotsta.re/media/87d4f0597ca385fcf7460b9ec3b059df00db8ca738f6366ee96d9e8b167070eb.png
    • Embed this notice
      Tulip ?️‍⚧️ (domi@donotsta.re)'s status on Tuesday, 11-Feb-2025 07:45:04 JST Tulip ?️‍⚧️ Tulip ?️‍⚧️
      in reply to

      okay so I experimentally determined that the max size that feh wants to see in any direction is 32767 (0xff7f0000). but it doesn’t have checks for negative values, so I can ask it to display a 32768 x -1 file, with interesting results

      In conversation about 3 months ago permalink
    • Embed this notice
      Tulip ?️‍⚧️ (domi@donotsta.re)'s status on Tuesday, 11-Feb-2025 07:45:05 JST Tulip ?️‍⚧️ Tulip ?️‍⚧️
      in reply to

      lmfao why is the image width/height in this format a signed value. what is the purpose of a BMP that’s -1 pixel

      In conversation about 3 months ago permalink
    • Embed this notice
      Tulip ?️‍⚧️ (domi@donotsta.re)'s status on Tuesday, 11-Feb-2025 07:45:06 JST Tulip ?️‍⚧️ Tulip ?️‍⚧️
      in reply to

      okay, there are no restart markers, i can make it skew if I touch only one coordinate

      now, for a curiosity: if the image declares to be longer than it actually is, most decoders will show it like the pic on the left. but feh for whatever reason just reads along, probably dumping some of its memory? :neocat_0_0:

      i like the pretty lines on the top, but they’re not my creation - and they differ on every startup of feh!

      In conversation about 3 months ago permalink

      Attachments


      1. https://asdf.donotsta.re/media/2e6e914b28ff0c252783038e25276ee394bd9f6121399e923e702137bfa8da64.png

      2. https://asdf.donotsta.re/media/b9b4e4fc3f3bfbe2a647d3062f033ebfeb711e7fb3d16ef8f7eb9e05844b1e81.png
    • Embed this notice
      Tulip ?️‍⚧️ (domi@donotsta.re)'s status on Tuesday, 11-Feb-2025 07:45:08 JST Tulip ?️‍⚧️ Tulip ?️‍⚧️
      in reply to

      the cool part about 4bpp is that one pixel directly correlates to one character in a hexdump. this makes math much easier

      anyways I decided to split it into lines for easier reading. you can see the brick if you squint real hard

      In conversation about 3 months ago permalink

      Attachments


      1. https://asdf.donotsta.re/media/d3d02b521b1ccd05f8c4c155fb7a25b3322c86154f491f165f99b9a346ccadac.png
    • Embed this notice
      Tulip ?️‍⚧️ (domi@donotsta.re)'s status on Tuesday, 11-Feb-2025 07:45:09 JST Tulip ?️‍⚧️ Tulip ?️‍⚧️
      in reply to

      so i didn’t find an end marker but I managed to skew my picture by replacing some nullbytes with 0xff. hmm.

      In conversation about 3 months ago permalink

      Attachments


      1. https://asdf.donotsta.re/media/72f9af5b650724ab71b9feea46595ca5d7990a9ea3a819856bd7d49767069fa0.png
    • Embed this notice
      Tulip ?️‍⚧️ (domi@donotsta.re)'s status on Tuesday, 11-Feb-2025 07:45:10 JST Tulip ?️‍⚧️ Tulip ?️‍⚧️
      in reply to

      interesting observation: the original was 32x32, I changed that to 28x35, expecting it to skew. but it didn’t! it just cut off one of the edges

      this means that there has to be an end marker on each pixel line

      In conversation about 3 months ago permalink
    • Embed this notice
      Tulip ?️‍⚧️ (domi@donotsta.re)'s status on Tuesday, 11-Feb-2025 07:45:11 JST Tulip ?️‍⚧️ Tulip ?️‍⚧️
      in reply to

      after swapping a few values in the presumed palette, my redbrick.bmp became more of a grnbrick.bmp

      In conversation about 3 months ago permalink

      Attachments


      1. https://asdf.donotsta.re/media/88bf17055bf789f477edbf521c6936276d49c3ee8ffd338ec204cd5d254cfb4c.png

      2. https://asdf.donotsta.re/media/61ec68a0486f33034fdbf2f097fe594754f94e457881cbfbb3565df0fa1fb6ae.png
    • Embed this notice
      Tulip ?️‍⚧️ (domi@donotsta.re)'s status on Tuesday, 11-Feb-2025 07:45:12 JST Tulip ?️‍⚧️ Tulip ?️‍⚧️
      in reply to

      the first 0x01000400 actually defines the bit depth! nice

      i wonder what the first 2 bytes from it are for

      In conversation about 3 months ago permalink
    • Embed this notice
      Tulip ?️‍⚧️ (domi@donotsta.re)'s status on Tuesday, 11-Feb-2025 07:45:13 JST Tulip ?️‍⚧️ Tulip ?️‍⚧️
      in reply to

      it divides nicely into 24 u32 values, but I don’t think this is just a palette; the image is supposed to be 4bpp, which gives us 0b1111 (15)… 16 possible values.

      so the leading 8 u32’s are probably something else (which would also explain why they’re all zeroes.

      In conversation about 3 months ago permalink

      Attachments


      1. https://asdf.donotsta.re/media/7aa11377800cb21b303de2fa6451b44e9c00b34c3a2506d5ec3d38ca589f1648.png

    • Embed this notice
      Tulip ?️‍⚧️ (domi@donotsta.re)'s status on Tuesday, 11-Feb-2025 07:45:14 JST Tulip ?️‍⚧️ Tulip ?️‍⚧️
      in reply to

      so, I have:

      • magic
      • cbSize (ignored by the decoder in feh)
      • a mysterious empty u32
      • two mysterious non-empty u32’s
      • width
      • height
      • palette?
      • image itself

      the palette is interesting because it looks like half of it is just null data:

      out+="010004000000000000000000000000000000000000000000000000000000000000008000008000000080800080000000800080008080000080808000c0c0c0000000ff0000ff000000ffff00ff000000ff00ff00ffff0000ffffff00"
      In conversation about 3 months ago permalink
    • Embed this notice
      Tulip ?️‍⚧️ (domi@donotsta.re)'s status on Tuesday, 11-Feb-2025 07:45:15 JST Tulip ?️‍⚧️ Tulip ?️‍⚧️
      in reply to

      the hell is a cbSize. i know hungarian convention at an “intermediate” level (read: I try to understand the name instead of getting angry at the naming scheme) but I can’t remember what cb stood for

      In conversation about 3 months ago permalink

      Attachments


      1. https://asdf.donotsta.re/media/3b8eff2acb38214a82e8851d7be5e9bdd611a4a41e8eb033a0f3f50b2c4a168d.png
    • Embed this notice
      Tulip ?️‍⚧️ (domi@donotsta.re)'s status on Tuesday, 11-Feb-2025 07:45:16 JST Tulip ?️‍⚧️ Tulip ?️‍⚧️
      in reply to

      so far i’m most flabbergasted that BMPs load from the bottom up. like, i knew that, but it still caught me off guard

      In conversation about 3 months ago permalink
      Haelwenn /элвэн/ :triskell:, Doughnut Lollipop 【記録係】:blobfoxgooglymlem: and feld like this.
    • Embed this notice
      Tulip ?️‍⚧️ (domi@donotsta.re)'s status on Tuesday, 11-Feb-2025 07:45:17 JST Tulip ?️‍⚧️ Tulip ?️‍⚧️

      do you ever just decide to hexdump a file and reverse-engineer your way through how it’s encoded without looking at any docs?

      no? just me? alright

      In conversation about 3 months ago permalink

      Attachments


      1. https://asdf.donotsta.re/media/54c29e45bf030997dd86075832ae12c5e23b01dc52dc686ae21747536ff52efa.png
      Doughnut Lollipop 【記録係】:blobfoxgooglymlem: repeated this.

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.