-->
0 Members and 1 Guest are viewing this topic.
unsigned char Render_ACPNG_Data(void*datapointer, short x, short y, char mode, void*additional_args = 0);
Qwerty: im basically using 90% of the .png format already, im just adding in a few things to make compression of data of utmost importance, while normal png files are balanced between speed and size. However, good concerns, and thanks
Also, the prizm's file type can only support up to 3 letters? O.o
PNG rendering isn't made for speed and optimization in the least. Most rendering algorithms like the Adam7 routine would be way too slow for a device with onoy a 29MHz speed. However, its quite fine on a 1GHz machine. But that's not what we're working with. And, my rendering routine also has to be fast, and common PNG formats and rendering scripts are much too large.The PNG format I'm playing with will be perfect for the Prizm.
Quote from: Ashbad on May 25, 2011, 09:52:03 amPNG rendering isn't made for speed and optimization in the least. Most rendering algorithms like the Adam7 routine would be way too slow for a device with onoy a 29MHz speed. However, its quite fine on a 1GHz machine. But that's not what we're working with. And, my rendering routine also has to be fast, and common PNG formats and rendering scripts are much too large.The PNG format I'm playing with will be perfect for the Prizm.Ah, okay. And it's supposed to be for use inside programs only?
class BitmapFile directory = nil openedfile = nil EXTENSION = "bmp" def initialize(directory) @directory = directory.chomp.to_s if @directory.rpartition(".")[2] != EXTENSION puts 'Exiting -- not a bitmap!!' exit end end def getdir return @directory end def openfile @openedfile = File.new(@directory, "r") end def closefile @openedfile.close end def getsize return File.size(@directory) endendcurrentfile = BitmapFile.new("C:\\Users\\Adam\\Desktop\\kitty.bmp")currentfile.openfileobject = 255absorbed_file = Array.new(currentfile.getsize, object)currentfile.getdir.each_byte {|byte| absorbed_file[byte] = byte}currentfile.closefileputs 'Currently chosen file :-- ' << currentfile.getdirputs 'Size of Bitmap file :-- ' << absorbed_file.length.to_s << ' bytes';puts
Currently chosen file :-- C:\Users\Adam\Desktop\kitty.bmpSize of Bitmap file :-- 4158 bytes
How large are the decompression binaries?
class BitmapFile directory = nil;openedfile = nil #non-standards EXTENSION = "bmp" #constants sizeoffile = nil #standards def initialize(directory) @directory = directory.chomp.to_s if @directory.rpartition(".")[2] != EXTENSION puts 'Exiting :-- not a bitmap!!';exit;end @sizeoffile = File.size? @directory if @sizeoffile == nil;puts 'Exiting :-- file doesn\'t exist!';exit;end end #non-implied get methods def getdir;return @directory;end def getbyte(specific_byte);return IO.read(@directory, 1, specific_byte);end def getsizeofile;return @sizeoffile;endendcurrentfile = BitmapFile.new("C:\\Users\\Adam\\Desktop\\kitty.bmp")absorbed_file = Array.new(currentfile.getsizeofile) {|byte_index| byte_index = currentfile.getbyte(byte_index).bytes.to_a}puts 'Currently chosen file :-- ' << currentfile.getdirputs 'Size of Bitmap file :-- ' << absorbed_file.length.to_s << " bytes\n"