Scaling Bitmap - page 6

 
Nikolai Semko #:

I'm embarrassed to ask - why do you need the BMP format? Isn't it easier to use PNG?


PNG files are smaller, have transparency support and no quality loss.

the Deflate algorithm is brutal actually (Png) 

 
Lorentzos Roussos #:

the Deflate algorithm is brutal actually (Png) 

I met here on the forum a few years ago the implementation of this algorithm and even tested it.  100-200 lines of code, decompressing took 10-20 milliseconds for a 600x800 image.
 
Nikolai Semko #:
I met here on the forum a few years ago the implementation of this algorithm and even tested it.  100-200 lines of code, decompressing took 10-20 milliseconds for a 600x800 image.

Nice , i almost got depression from trying to understand it .

If you happen to come across the script i'd like to use it. 
 
Lorentzos Roussos #:

Nice , i almost got depression from trying to understand it .

If you happen to come across the script i'd like to use it. 
Yes, I should probably publish it in the code base, as soon as there is time.  I need to look for my old experiments.  I remember that the code was written in the form of functions, and it would be more correct to arrange it in the form of a class.
 
Nikolai Semko #:
Yes, I should probably publish it in the code base, as soon as there is time.  I need to look for my old experiments.  I remember that the code was written in the form of functions, and it would be more correct to arrange it in the form of a class.

great that would be a good publication . 

 
Lorentzos Roussos #:

great that would be a good publication . 

I hope :)

 
Lorentzos Roussos #:

great that would be a good publication . 

I found. Everything seems to be working.



I just don’t understand yet how to do without renaming the png file to bin.

Files:
PNG.png  222 kb
 
Nikolai Semko #:

I found. Everything seems to be working.



I just don’t understand yet how to do without renaming the png file to bin.

ow you are writing the stream only ? 

 
Lorentzos Roussos #:

ow you are writing the stream only ? 

I didn't work much with files. I can't figure out how to load a png file into a uchar array without renaming the file. After all, FileReadArray() only reads *.bin files.

I want the input to be the string "path" to the png file, and the output bitmap is an array of uint.

 
Nikolai Semko #:

I didn't work much with files. I can't figure out how to load a png file into a uchar array without renaming the file. After all, FileReadArray() only reads *.bin files.

I want the input to be the string "path" to the png file, and the output bitmap is an array of uint.

I figured it out.