12
lxmcf
12d

Custom image format update:

Currently converts a 12KB PNG image into 172KB BIN file, now to compress the fuck out of it!

Update: Fuck should I use a buffer or simple binary data for file structure manipulation....

Comments
  • 0
    Also can anyone recommend any colour format other than #RRGGBBAA that would suit minimal size?
  • 0
    #HHSSLLAA
  • 0
  • 1
    If you have a color like #ff00ff66 you could shorten that to #f0f6.
  • 0
    @olback Ah yes!

    Don't know how i forgot that
  • 1
    Minimum size is with one bit per pixel in black and white. Even smaller is one bit for four pixels as average. Or one bit for the whole averaged picture.

    Or even zero bits if you just throw it away.
  • 1
    @Fast-Nop well I was just going to do a list of each colour and assign each pixel 1 byte but this throw it away idea sounds pretty efficient
  • 1
    @lxmcf It's also more secure. The mafia has always said, the less you know the better for you.
  • 2
    @Fast-Nop it's so encrypted that literally nothing can interpret it... I'm going to patent this and sell it
  • 2
    @lxmcf yeah like my handwriting.
  • 0
    Wait, you didn't even compress it yet?
  • 3
    @kescherRant it's legit just raw data with every pixel taking 4 bytes [blue, red, green, alpha]

    Going to compress that to a colour lookup table with each pixel giving 1 byte that points to a colour in the table
  • 0
    @lxmcf that's basically what PNG in palette mode does.
  • 1
    @Fast-Nop shhhhhhhhhhhhhhhhhhhhhhhhhhh
  • 1
    @Fast-Nop It's also designed to be able to store multiple images in one file by combining the colour tables... Novel idea but hey
Your Job Suck?
Get a Better Job
Add Comment