Poll

This?

Yes.
5 (62.5%)
No.
3 (37.5%)

Total Members Voted: 8

Author Topic: Hey guys I made an... image format.  (Read 1936 times)

Youtube example:
http://www.youtube.com/watch?v=URAr-3raHzI

Design document (version 1):
Quote
18/09/2010

Syerjchep Pallett Based Image Format Version One

   The primary advantage to this image format is an image format that can be compressed to a signifigently smaller size than any other. Instead of storing each pixel's red value, green value, and blue value, as well as in some cases, alpha (transparency) value, this image format uses a pallett of colors. However, the pallett of colors is not static. The full RGBA values for each color on the color pallet are to be stored in the file along with the pixels and other data. The signifigance of this comes in the fact that the colors can be changed. So multiple pixels can be stored in one byte, by only storing a number that is a pointed to the particular color in the pallett. Meanwhile, image editors are to display and allow editing to the pallett, thus the colors, and number of colors, can be changed according to the needs of the image.

   The image format starts off with a five bit header. The header should have the text value "SYJIM", for SYerJchep IMage. The next byte is the version number, this version uses zero. Then comes the dimentions. The next byte is the width of the image, stored in just one byte, the height is the same way, however the values are only one forth of the images size, thus version one only supports images up to 1020x1020 pixels, and the sizes must both be multiples of four above zero and below 1020.

   Then comes the color pallett, version one only supports 16 colors, version two should allow for 4,8,16, or 32 colors. The sixteen colors come in order now. Each color has a red value, a green value, a blue value, and an alpha value. Each is stored with just six bytes. Colors can go from 0 to 255 (current standard), and must be a multiple of four, although this technically implies a range of 0 to 63 on it's own scale. Sence each color is stored with six bytes for each of it's four values, that means that each color takes up about three bytes. Sixteen colors' three bytes totals to only 48 bytes for the entire color pallett, and in later versions transparency will be able to be turned off reducing the size or increasing the persion of color values, also the number of colors could be reduced, or increased.

   Then comes the actual pixel data. In version one, the pixel data always has a starting offset of 56 bytes, this will change however. Currently sence there is only a 16 color option, each pixel takes up four bits. The values are stored compressed into bytes, so that in version one, the data for exactly two pixels can be stored in two bytes. In further verions the color for each pixel will be 2,3,4, or 5 bits each.

   The pixel data is followed by the value 0xFFFFFF (255,255,255), rather, 24 'true' bits. After which the meta data comes. Each metadata argument is to by suffixed with a byte containing the value 0xFE, 254 in decimal. The metadata's arguments themselves can not contain the number value 254. After the 0xFE byte that concludes the last byte of the last metadata argument there is to be another 24 'true' bits, concluding the file.

Download current version of BMP to SYJI converter, and SYJI viewer/editor here, if you really want:
http://www.filefront.com/17300808/syerjchepimagedebug.zip

So, yesterday I got the idea to create a new image format, basically one that can reduce image size a lot, but reduces total colors. Now of course there is always monochrome and 16 color bitmaps, but this is different. In later versions you  will be able to choose 4,8,16, or 32 colors, but for now it's just 16. Thing is, you can control what those 4,8,16,or 32 colors are, which makes it not nearly so bad.

I made a viewer and editor for these kind of files, and of course, a basic BMP converter so that you can compare sizes and such. And to convert back, for now just take a screen shot of the editor and clip the actual image out and copy it to another editor.

This format can create images that are by default at least twice as small as the smallest current image format compressed,or at least that's what I have observed.

ATM there are of course problems, for example, images you convert need to have width and length that need to be a multiple of four, and must be larger than 16 and smaller than 1024. Other things will come up, I'm sure, but at least it works, and I'm working out bugs.

The converter by default looks at all the colors, and see which ones are used the most, this may not always be the best option, espically for images with a lot of shading, thus you can choose from a predefined color, or gray scale pallet instead, soon you'll even be able to just type up your own pallet.

BTW, this is mostly good for screenshots, animated things, pretty much every meme that you'd see on a *chan website, and charts and graphs.

EDIT: This format supports transparency, and will soon support animation.

Well; discuss...

(I also want to make a firefox add-on some day that let's you display the images on a website like normal image formats.)
« Last Edit: September 18, 2010, 07:00:45 PM by DrenDran »


tl;dr please
I made an alternative to current image formats and a stuffty editor to go along with it.

Whats it compatibility with general programs?

Whats it compatibility with general programs?
Well, considering it's a new format... none.
I should now embark on the task of making scripts and add-ons for programs that use images wherever possible.

tl;dr please

image editor that can drastically reduce image size, but also color amount

DrenDran is good at coding :o

Well, considering it's a new format... none.

Darn. Can't even fool programs into thinking its a different format?  :panda:

Reminds me, how is your MORPG going?

Make it so you can view it on a browser.

whattheforgetamireading.syji

whattheforgetamireading.syji
I had to:
http://www.filefront.com/17300896/images.bmp.syji

(The converter completely forgeted up the text, like I said, the converter has a few bugs.)
Make it so you can view it on a browser.
(I also want to make a firefox add-on some day that let's you display the images on a website like normal image formats.)

DrenDran is good at coding :o
It's not even that hard.

And this stuff has been done and in practical use already.

It's not even that hard.

And this stuff has been done and in practical use already.
I knew you couldn't resist such a topic.
However, there are no popular image formats that support dynamic pallets.

DrenDran is good at coding :o
if only he was as good at math as he is at this