Kuribo64
Views: 19,981,906 Home | Forums | Uploader | Wiki | Object databases | IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search
04-16-24 11:10 PM
Guest:

0 users reading New lossy image format! | 1 bot

Main - Computers and technology - New lossy image format! Hide post layouts | New reply


Yoshimaster96
Posted on 12-30-14 11:07 PM Link | #53496
I made a new lossy image format. For now, dimensions must be multiple of 4.
Compare:
2,359,296 bytes (Raw image)
[image]
393,220 bytes (My image)
[image]
It uses 8 bytes per 4x4 pixel area.
Format:
Header:
02 Width
02 Height
Data:
4x4 Block:
01 Red 1
01 Red 2
01 Green 1
01 Green 2
01 Blue 1
01 Blue 2
02 Walsh matrices to use (1 nybble per channel)
The top-left 4x4 corner is what my format uses:
[image]
Black in this picture means color 1, white means color 2.
So, bitwise, its:
0000RRRRGGGGBBBB

My Youtube Channel:
Yoshimaster96smwc
Some layout tips/code!

-Yoshimaster96

MercuryPenny
Posted on 12-31-14 02:56 AM Link | #53516
So basically a PNG converted to JPG with Paint?

Arisotura
Posted on 12-31-14 03:06 AM Link | #53517
Meh, that's lossy as fuck. You might as well shrink it and display it stretched with a linear filter and you'd get better quality for roughly the same size.

____________________
NSMBHD - Kafuka - Jul
melonDS the most fruity DS emulator there is

zafkflzdasd

Yoshimaster96
Posted on 12-31-14 07:07 PM Link | #53551
Yeah, it's just an early alpha build. I came up with new specifications, and am working on the conversion code (there are still some bugs). Will be much better in the end, though.

My Youtube Channel:
Yoshimaster96smwc
Some layout tips/code!

-Yoshimaster96

Jesse
Posted on 01-01-15 11:48 AM Link | #53597
and how exactly can windows understand these files?

Arisotura
Posted on 01-02-15 01:19 AM (rev. 2 of 01-02-15 01:24 AM) Link | #53681
> 02 Walsh matrices to use (1 nybble per channel)

So I take it you use 4 bytes per channel, that is, 12 bytes.

If you add one bit per channel, you'll be able to use more matrice types without needing more space.


Also, your example image isn't a very good example given the compression method you're employing. Your format would work best for photographs. (for something like the drawing you used, a paletted format with an appropriately sized palette and LZ77 type compression would be very efficient while preserving the image's quality)

____________________
NSMBHD - Kafuka - Jul
melonDS the most fruity DS emulator there is

zafkflzdasd

Yoshimaster96
Posted on 01-02-15 02:18 AM Link | #53684
Actually, it's 8 bytes per 4x4 area. Technically, I could double the amount of matrices, but I don't know what to put there. If I multiplied the number by 4, I'd get 64 8x8 matrices.
9 bytes could look like this:
The following is split by nybble, so first entry is MSN1 MSN2, second entry is LSN1 LSN2:
01 Red 1
01 Red 2
01 Green 1
01 Green 2
01 Blue 1
01 Blue 2
The following is split by nybble, so entry is MSN matrix LSN matrix:
01 Red Matrix
01 Green Matrix
01 Blue Matrix

My Youtube Channel:
Yoshimaster96smwc
Some layout tips/code!

-Yoshimaster96

Arisotura
Posted on 01-03-15 08:54 PM Link | #53766
Another possibility would be to replace the Walsh matrices with more common patterns.

Or take it even further and convert the image to tiles.

Dunno.

____________________
NSMBHD - Kafuka - Jul
melonDS the most fruity DS emulator there is

zafkflzdasd


Main - Computers and technology - New lossy image format! Hide post layouts | New reply

Page rendered in 0.029 seconds. (2048KB of memory used)
MySQL - queries: 27, rows: 212/212, time: 0.009 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2018-07-20)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.