Binary Pixel Map


Chastity and the search for love

I’m working on a new image format. I’m pretty sure the layout of the format is final. It has all the features of my BBM format but uses a new header which allows for comments because the 4 bytes at address 0x0C are the pointer to the pixel data. This means literally anything could be between the header and the data. In this example a small comment of the name of the format: “Binary Pixel Map”. These screenshots show the equivalent PBM file and the checkerboard that it looks like.

Screenshot (370)Screenshot (371)Screenshot (372)

The goal of this format is to be able to eventually support any type of image whether monochrome, grayscale, or full color RGB. The code needs work but if I made a good conversion tool people would see why my format is superior to several others with the exception of compression because I don’t know how that works yet, but…

View original post 7 more words

Advertisements

Pro-life Vegan Rant


Chastity and the search for love

Screenshot (301)

In the original post, George said: “With all these dumb “abortion isn’t vegan” posts lately, I figured some of you pro-birthers could use a friendly reminder of the kinds of people who agree with you on that issue. And who doesn’t love Westboro Baptist Church, right? Amongst all these signs displaying insanely homophobic and racist rhetoric, you’ll find one at the bottom right that decries abortion. It’s been circled for your convenience. So much compassion in one picture! Because as you all love to say, “You can’t be a compassionate vegan unless you’re pro-life,” right?Well if the congregation at Westboro Baptist are your kind of people, then please carry on.”
I want to criticize this ridiculous post George Chapman wrote. His argument was basically that pro-life people are bad because they happen to agree with the Westboro Baptist Church on one thing, that abortion is bloody murder.
 

View original post 359 more words

Image Format Plans


There are so many decisions to be made when designing my own image format. I know it will be a 1 bit per pixel format much like monochrome BMP files or PBM and XBM.

However the exact details of the header have yet to be decided.

Currently my program produces Windows version 2 BMP files for the checkerboard. This format has been supported since Windows 2.0(released December 9 1987!).

https://en.wikipedia.org/wiki/BMP_file_format

14 bytes for the bitmap file header

12 bytes for the DIB header

6 bytes for the 2 colors in the palette. Each taking 3 bytes for Red, Green, and Blue.

That’s a total of 32 bytes. I love the BMP format but it has a lot of junk data in the header that is reserved or tells how many bytes are in the file.

But my biggest criticism of the format is the fact that the width of each row must be a multiple of 4. This means hundreds of extra bytes for no good reason.

PBM files only have a few extra bits at the end of the row if the image width is not a multiple of 8 but that’s only because computers operate on 8 bits at a time.

PBM was the first official format that I learned to write with only code from the C standard library. In fact a few printf and looped fputc calls on a file opened in binary writing mode is really all you need. The details of that format are here.

http://netpbm.sourceforge.net/doc/pbm.html

Both the Windows BMP and the NetPBM PBM format are perfectly capable of storing ANY image containing only black and white. They can also pack each pixel into a single bit!

But here is where they differ.

BMP files can have a color palette so that the two colors can be whichever two colors the author chooses.

PBM can be black and white only

BMP requires padding at the end of each row of pixels to be a multiple of 4 bytes.

PBM doesn’t have to have that extra padding and the files will typically be hundreds of bytes smaller.

BMP files have binary headers for the information about the bitmap and how it will be displayed.

PBM files have a plain text header that can be viewed even in Notepad! Yet they still are smaller than the space wasting headers of BMP.

I have decided currently that my format will be called:

BBM: Binary Bit Map

Sort of redundant I know but it was to emphasize that it’s a format for two colors. I reject the gender binary but not the binary numeral system! Also there will be no plain text unlike PBM has.

But the specific details of how the information will be stored has a few things that I’ll need to decide on.

1. Do I have the width and height be 4 bytes each for a total of 8 bytes of a header? That would allow up to 4294967295*4294967295 size images.

Or do I use only two bytes for each which allows a maximum image of 65535*65535? That’s probably bigger than any image that websites allow uploading. A single image would be close to 4 GB!

2. Do I include a color palette like BMP has or should it be strictly black and white for tradition?

3. How will I deal with the extra unused bits when the total number of pixels is not a multiple of 8? Should I use the same routine as for pbm where the end of the row is padded to be a full byte. Or should I use an even more clever method like only padding to a full byte at the end of the entire image? I think there are advantages and disadvantages to each approach.

Additional notes:

Also worth mentioning is the XBM format.

https://en.wikipedia.org/wiki/X_BitMap

XBM is worth mentioning because although it is a text format and takes a lot of space, it is a monochrome format which stores 1 bit per pixel. My own format will be so much like it that converting it to an XBM would be trivial.

Open Letter To Non-Vegans Who “Love Animals”


This is exactly how I feel about the self proclaimed animal lovers too.

think&thrive

Animal products, animal riding, animal racing, hunting, pet breeding, rodeos, circuses, and zoos all have one very important thing in common: The fact that they are UNNECESSARY to human existence.

They are also all directly responsible for by far the majority of needless global suffering.

The following letter is a confrontation and challenge to self-proclaimed “animal lovers” who are still selfishly paying the mentioned industries to provide products and services of needless suffering. [AKA, those who eat and wear animal products and/or participate in animal sport/entertainment sectors.]

~

To whom it may concern,

You DO NOT love animals.

What you MEANT to say was, “I love the company and comfort of having “pets”.

Constantly I hear and see people say this. “I love animals”, always coming from people who EAT and WEAR animals, who label themselves “animal lovers” while also participating in the massive holocaust of countless species of…

View original post 359 more words