Home | Reviews | GUIpedia | Forum | Fun500


tacodrake95Image Compression
i have had an idea for image compression in QB but am unable to put it into code right now, so i will just write our how it works and try to code it as much as possible. If someone could use this that would be cool, but if not it's alright. the format of the original bitmap (try to guess what it is) would go as follows: 20 20 15,15,15,15,15,15,15,15,00,00,00,00,15,15,15,15,15,15,15,15 15,15,15,15,15,00,00,00,15,15,15,15,00,00,00,15,15,15,15,15 15,15,15,15,00,15,15,15,15,15,15,15,15,15,15,00,15,15,15,15 15,15,15,00,15,15,15,15,15,15,15,15,15,15,15,15,00,15,15,15 15,15,00,15,15,15,15,15,15,15,15,15,15,15,15,15,15,00,15,15 15,00,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,00,15 15,00,15,15,15,15,00,15,15,15,15,15,15,00,15,15,15,15,00,15 15,00,15,15,15,00,15,00,15,15,15,15,00,15,00,15,15,15,00,15 00,15,15,15,15,15,00,15,15,15,15,15,15,00,15,15,15,15,15,00 00,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,00 00,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,00 00,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,00 15,00,15,15,00,15,15,15,15,15,15,15,15,15,15,00,15,15,00,15 15,00,15,15,15,00,15,15,15,15,15,15,15,15,00,15,15,15,00,15 15,00,15,15,15,15,00,00,15,15,15,15,00,00,15,15,15,15,00,15 15,15,00,15,15,15,15,15,00,00,00,00,15,15,15,15,15,00,15,15 15,15,15,00,15,15,15,15,15,15,15,15,15,15,15,15,00,15,15,15 15,15,15,15,00,15,15,15,15,15,15,15,15,15,15,00,15,15,15,15 15,15,15,15,15,00,00,00,15,15,15,15,00,00,00,15,15,15,15,15 15,15,15,15,15,15,15,15,00,00,00,00,15,15,15,15,15,15,15,15 So the format is XSize YSize Data the way it is compressed is by finding blocks of data that are the same and indexing tem so the first line would change from: 15,15,15,15,15,15,15,15,00,00,00,00,15,15,15,15,15,15,15,15 to 15x8,0x4,15x8 This line has been compressed by a factor of 20%. Not all files will have this large of blocks that are the same, so the compression ratio will vary depending on the file. the format for the new data block goes as follows: 1)Any pixel that has ONE in a row is left as is 2)Any line of pixels is displayed as COLORxNUMPIX with x as the seperator.
2011-09-1612:23 PM

DickRe:Image Compression
it called RLE. there are probably 100 examples of this on the network54 forum.
2011-09-161:40 PM

tacodrake95Re:Image Compression
i just figured this out on my own last night thinking about how i would compress my image files for Cyclops. I haven't been able to code this though because I don't have a computer that will run dos applications because for some reason my version of windows xp pro just refuses to run them.
2011-09-162:51 PM

RetroMRe:Image Compression
Use DOSBox dude. XP/Vista/7 don't run dos applications very well.
2011-09-178:27 AM

JasonRe:Image Compression
I think there is a format like this? but yeah, if you dont like the feel of dosbox, just get virtualbox or something
2011-09-1711:19 PM

pharoahRe:Image Compression
The blockmap format used by the QML paint tool is an example of a simple RLE compressed image format. The first 2 characters are the height in hex, the second 2 are the width in hex, and the remaining characters are either 0-F (a 4 bit color) or G-Z (a multiplier representing 2-21 I think). Thought I'd post this info in case that helps you create your own format. The advantage to blockmap is that it's easier to copy, paste, and email to oneself than QML is.
2011-09-188:13 PM

Code


2021 Brandon Cornell