I made my own Image File Format
Vložit
- čas přidán 20. 08. 2024
- Image File Formats are... images.
GitHub: github.com/fac...
Patreon: / facedevstuff
Discord server: / discord
Twitter: / facedevstuff
MUSIC:
Background song - • Jeremy Blake - Powerup...
Outro song - • 9 • Nine Nights • Day ...
Thumbnail art by @JersonEXE
- Twitter: / jersonbrawlstar
Thanks for watching!
"I'm tired of these stupid image file formats, so I'm contributing to the problem"
439 likes and 1 reply?
😂😂
@@akaithecreator7448 why are you here
lol
@@BadmanYT-1254bro really said “Begone fool, for thou hath spoken too foul a word to remain” 💀
The major difference between jpeg and PNG is not only transparency but also the compression
Both are compressed. Just with really different methods.
Jpeg tries to emulate chunks of 8x8 px with parameters to a trig function (lossy to veeerry lossy depending on some parameter, but even the best quality (and thus worst compression factor) is very lossy).
PNG however is basically a bitmap (lossless, no compression) which is then compressed with tar/gz algorithm. Basically cheating by making the 3rd party compression algorithm part of the file definition.
It's like putting wave files into a zip folder and calling it a new audio format.
@@borstenpinselSomething like audio FLAC, as it's lossless compression for PCM audio?
jpeg and png both can store a lossless image
@@milesmartig5603 jpeg is per definition a lossy format even if you crank up the quality to 100% it’s still doing magic things with Fourier transformation and converting your image in a lot of lookalike patterns that they are close enough of the original pixels.
@@borstenpinselYou can't say PNG doesn't have compression, it just has lossless compression, even before tar/gz
wow, coverting a binary -> string -> do string manipulation -> show from the string. What's inside your head bro, it's pure genius
Going from int to string to almost always a terrible idea, just thinking of memory or lack of multiplication for data manipulation, have fun blurring in hex with strings.
I love that he did it tho, sometimes u just gotta f around and find out, else we wouldn't have nice things in the first place :)
@@haraldbackfisch1981 I think the OP was ironic, as the format of the message felt like that.
@@AOSP-is-still-Linux youre right idk what i was thinking... wasnt thinking i guess 😅
Srsly
BWTC32Key B3K files are what happens after crossing compression with encryption with binary-to-text encoding. It actually works well in spite of me doing it because I don't like Base64.
2:27 "turns out its not 3.5 times more size" *shows a picture of 3.3x* "it can go up to 98 percent more size" *shows a picture of 98 times more size* on a 160.2 times more size image. yep thats face dev for ya
bro made a .bmp
was about to comment this
but worse
@@_kitaes_ just a tiny bit worse but it balances out with the funnies :3
@@_kitaes_ yeah, but it ends with .bruh, worth it
bro, why are you here, smily face demon.
By converting it into hex of 6 characters, you lost transparency. However, if you made it hex of 8 characters long, you could keept the transparency.
very inneficient
with 8 characters you'd only get 1 decimal point of transparency
9 characters is pretty good tho
@@Luna5829 RRGGBBTT, with T transparency. So 256 values. What do you mean with 9? Am I missing something? (I don't count the # you would write in code since it is not needed)
i forgot the transparency could also be in hex and not in decimal
but still, with T / 255 being the transparency, you'd miss quite a few numbers
@@Luna5829 You wouldn't miss anything visible to the human eye ^^
There's a reason why no one uses amounts above one byte (2 hex digits) per color
Now make a .huh file that is an audio format
this but its just a .wav stored as a string
and then .bruhuh for videos
@@HiloYT you could make a conlang out of this
.huh3 then .huh4
wowzers, im converting all images in my gallery to .bruh files! so efficient, fast and lightweight
Tip: you can half the size of your files if you store the RGB values as raw bytes instead of characters. Each character is 1 byte long (assuming you are using a 1 byte character encoding like ASCII or UTF-8), but a hex character just represents half a byte in a human readable format. "9e", for instance, just represents the number 158 (uint8) which only takes up one byte, where storing "9e" as two characters you are using two bytes. Hex goes from 00 (0) -> FF (255), which is exactly how much a byte can hold. To do this you'll need to allocate a buffer of the number of pixels in the image times 3 (RGB per pixel = 3 bytes (1 byte for each colour) * number of pixels), then for each pixel: write a uint8 for the red value, write a uint8 for the green value, write a uint8 for the blue value. To read the file, loop over each pixel and read each byte (uint8) instead of writing.
If you wanted you could also add an alpha channel by just adding an extra byte after blue, this would make each pixel 4 bytes instead of 3. And now you've created the bitmap image format 🙂
Doesn't he do this 3m into the video
@@sollybunn I only stored the metadata (width & height) as bytes, the rest is full of hex values
he knew that, he's being rеtагded for no reason. he's just wants to jack up the yt algorithm, thinking "one day i will be making quadrillion dollars per nanosecond by pооping out: 'i pressed a key on my keyboard' / 'i copied seven lines of code from stack overflow' type of videos, yupeee!"
@@FaceDevStuff that's a bruh moment (you didn't really expand on "were dealing with raw bytes now" so that's what I assumed)
avif is actually conceptually really cool:
if you guys follow video formats, there’s been a big push to add AV1 support to everything because of how much of a huge leap in quality it is over essentially everything else. So much so, that if you encoded an image as a single frame of an AV1 video, it would be better quality than the other image formats available.
So that’s exactly what it is.
It makes a tonne of sense to use the same compression algorithms for both video and image and could in theory mean you could make hardware-accelerated images too. Very resource efficient, it would be great if we could just magically convert absolutely everything to use exclusively AVIF from now on
It's not.
JXL is better.
JXL better
No it actually doesn't make a ton of sense to use the same compression for video and static images. Video codecs usually use the information of multiple frames to be more efficient. Just thinking about P/B/I-frames, chroma subsampling, etc.
Hope alphabet sees this bro 🫶🏻
web✅code editor✅programing lang✅text editor✅image file format✅operating system❌
What's next? A coding font? Don't know if it can have more characters than UnifontEX.
i wanted to make a JSON image format
{
"meta": {
"size": "69x420"
},
{"pos":[1,1], "color":"696969"}
....
}
sounds hella inefficient, love it!
Should call it "jif" for maximum confusion
@@SIMULATAN can call it "Jim" - Json IMage
Absolute madman
This isn't too far off from plaintext images from the days of old like PPM.
Sure, it's absurdly inefficient as far as size goes, but you can edit it with nothing but a text editor, easily understand the format just by looking at it and they're very rarely used for large images anyway
the interlacing on this video is making me crazy
I think that might be part of the shitpost.
@@Aeduo nope, just plain stupidity on my part
I was thinking the exact same. Now the real question is, does it deinterlace ?
@@RockRemastered probably not because youtube's VP9 compression screws with interlacing
@@foco5657 that's pretty right. Resizing is the worst thing. But downloading the h264 video would maybe work.
"Hex" is representing the color data in base sixteen whilst "RGB" (don't include the alpha channel, it's not a fair comparison) is representing it in base 10. It's the same exact data. There's no space "reduction" if you don't bloat it by storing it in ASCII, but you figured that out.
Instead of bloating the file with line breaks you can just have a small header with the height and width.
1:21 delusion on a next level
Storing raw bytes is unheard of why not use a human readable 4bit representatipn instead (hex)?
If people are gonna read your image file they will do it in a hex editor@@joseph_gerald
@@joseph_gerald Not sure if stupid or trolling, your not going to give an image format the ability for someone to download it to their desktop, open up notepad, and read an images letters and reconstruct it in their mind at the cost of a 10-100x file size increase. And storing raw bytes is unheard of, look at the .png and .jpg format specifications for a clue on how deep it actually goes.
@@bits360wastaken sorry was sarcasm 🥲
@@bits360wastaken png stores compressed raw bytes
why store the hex as a literal string, a byte can be represented in one character (byte), instead you use two bytes to represent one byte??
congrats you invented .bmp
But 2x bigge
So this is what it feels like to be the guy who made the .webp file format
Webp is good actually pls research
@@sagnikkundu89 so the joke went over your head. I was talking how it got the same degree of support as .webp.
@@devaraanimation xDd. It wasn't obvious to me
3:24 OH MAN NOT RAM RANCH 💀
EIGHTEEN NAKED COWBOYS IN THE SHOWERS AT RAM RANCH
I will be using .bruh images as the primary image type on my pc
Same
congrats!
You just invented the netpbm file format 😊
The who-what now?
5:08 this song is a masterpiece
Instead of making an image compression format, bro made an image expansion format
3:48 hex colors don't even have transparency and you used alpha type opaque for the png, so i'm surprised it showed anything other than complete white before you put a number there.
2:32 That's not a percentage buddy. "100% more" means to double. Starting at 3mb and then adding 100% more would be 3mb + 3mb.
"buddy 🤓☝️"
situation: there are 10 competing formats
solution: lets create a new one to replace the old ones.
new situation: there are 11 competing formats
(Heavily based on an XKCD comic)
WOW, we are getting .bruh image file format before GTA 6.
I can not state how happy it made me to hear Nine Nights by 20syl in the outtro. I really enjoyed your editing style.
I love that song 😄
*outro
You can make the image of color layers.
For example: if it's just the background you determine the color of single pixel and then paste this pixel into different location instead of finding out the color of each pixel.
Repeat that multiple times with doffirent colors and you get and image! It will be VERY light no matter how many pixels are there on X and Y coordinates while the image contains only 1 color.
1:22 I'm not an expert, but one byte should be able to give 256 unique combinations, as it has 8 bits and one bit has 2 states - 2 combinations ^ 8 bits = 256, we even have a place for zero. (an int value usually weights 2-4 bytes, but I don't think we need its extra functionality for storing a number from 0 to 255). HEX uses 6 characters - each character is 1 byte, so 1 * 6 = 6. I think you can do both methods equivalent in bytes, but RGB is more intuitive.
Edit: Oh, everyone already commented about this :p
Low-key you explained better than my Prof tho
you're in my top 10 Dev CZcamsrs, I love your projects!!
I dont understand anything from it, I belive I am not for that. My skills and preferences are other, but is always good to have an eye on what is real and in trend with others.
thank you for defeating the monstrosity that is webp files
This is actually almost exactly what I wanted.
“I’m not an expert…” but does this
You just made a worse bitmap. But I really like it.
I love those indi projects
This reminds me of the .stalin image I created 3 months ago to send sus photos in case the group chat gets leaked
you can use regedit ti automatically set how it opens, what icon it has and add it to `right click>new` menu
normal people: png is good
FaceDev fans: .Bruh files
man i love this video.Bruh
blazingly fast file format
I was waiting for the "This video is in the .bruh format" 🥵🤧🥵
.bruh4 video with .bruh3 sounds
why this video is 1080i?
because vegas pro has no idea of what futureproofing is in its default settings
Ah yes, smartest rust programmer
Sooo, a ppm file but with hex instead of RGB? :p
3:21 interesting background song choice
Bro spent much hours, energies, and computer memories just for this "meme".
bro reinvented bmp but with extra steps
Yo you can try to convert the hex back to binary instead writing it as text, it will make the file size less for sure
Every channel in RGBA are only a byte long. You could fit an entire pixel in the space required for an int. Using string for for the color will double the size for each pixel
Beautifully chaotic
this is genius , evil , but genius , you can troll your friends to think the got a virus with one image☠
1:15 1080i detected
this is literally the XKCD comic about standards 😂
When you talked about storing RGBA in characters and not bytes, I was like.... bruh.
hey i’ll take it over .webp
i think the worst time of image file formats when you try to save them is "webm" or "webp"
why is this video interlaced
We should make it more better.
It is pretty easy to make your own file format, you really just lack support for it since no one knows it exists or how it works
Im ganna be making my own image format because i can
that's EXACTLY what i wanted to do, except in javascript
but i gave up because it's too hard and i wanted to do this in the current year 2024
BWTC32Key is a homemade file compression program with custom format written in Javascript.
@polonezzz stalker go away
@polonezzz I know
Oh, how I understand you, saying twelve instead of twenty...
I love your videos!
Close enough, welcome back carykh
bro just made bmp with hex
this dealt psychic damage :
the disguised file formats are relatable
"I made my own operating system in Rust" is coming eventually
You can say probably update the file format by telling it that if multiple pixels in a row are the same color that they could be simplified to the amount and then the pixel data, otherwise just the pixel data.
this certainly is a bruh moment
I think the issue with the tremendously high file sizes maybe because you are storing the ascii representation of the hex codes where in fact you can store hex codes as raw binary in the .Brun file
Now i can hide my pictures!!!!
If I go to download transparent pngs and find a load of files that are just bruh files pretending to be pngs then I'm actually going to riot. *You did this.*
jpeg is losy (you loose details)
png is lossless (you keep all the details)
If you are storing the hex in ascii, you can zip it like any text file.
This is somehow so captivating
what's the worst image format:
JFIF: like
WEBP: comment
comment
JFIF is a bitmap graphic that uses JPEG compression.
brother 255 255 255 and #FFFFF take the same amount of bits.
Both are three values of 2^8.
A HEX 'digit' represent 16 possible values. 2 HEX values represent 16^2 possible values, that is 256 possible values. Just like the each of the RGB values.
HEX is just numbers represented in base16
When you see it
i want you to make this more efficient than pngs so we can take over internet
Definitely using .bruh from now on
rgba is ten characters 📝
0:52
I see Rust, I click play
BWTC32Key is a homemade compression format.
as a unity developer .jfif is my 1# opp when importing textures
bro reinvented the bitmap image lmao
i always had an idea to detect text and store the characters used like as a font. then it would only store the position of the text.
this would be useful for text over detailed backgrounds.
imagine hiding images in the bruh format is s very goood idea
the fact it works 💀😭
Now change the exe file format to bruhh. eg. what.bruh
Instead of .exe ,you will use . bruh
now be the jxl replacement everyone wanted.
Nice work!
avif is actually the best file format
We need to make WEBP Files extinct
your vids inspire me
amazing
i think this format can be used with one of my scratch projects
Thanks! Now, I need to make a color format like hex but with 4 digits. First and second are oranges, third and fourth are greens. After that, I can make an image format that uses it called .ttp (two toned picture)
What if you used the first 2 for {how dark}, 1 for {orangeness} and 1 for {greeness}?
You c'd call it YUV: Yet another UV format!
bruh