Double to int errors
Re: Double to int errors
Hehe, in most cases there probably won't be that much of a difference LuX, so don't worry about it.
About the file sizes
Think about it: a pixel in ram is 4 bytes, whereas the text string "0xFF544437" is 10 chars = 10 bytes. What's wrong with saving the file as a .png?
About the file sizes
Think about it: a pixel in ram is 4 bytes, whereas the text string "0xFF544437" is 10 chars = 10 bytes. What's wrong with saving the file as a .png?
Chili
Re: Double to int errors
Hi Lux,
If the image you are converting is maybe a jpg or png they are compressed fileformats. Perhaps the file you are saving out is uncompressed which would give you an increase in file size.
Asimov
If the image you are converting is maybe a jpg or png they are compressed fileformats. Perhaps the file you are saving out is uncompressed which would give you an increase in file size.
Asimov
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk
Re: Double to int errors
Nothing... Just... experimenting. I like pixels and hex system, I want to try things out with them. I was wondering if I could load the text file pixels directly to D3DCOLOR.chili wrote:What's wrong with saving the file as a .png?
@Asimov, I converted a .bmp, but the difference of the same picture in jpg or png is only marginal.
I took a look what the internet has to offer an I found this: ofstream img ("Image.hex", ios::hex); Should save the image in hex format, rather than actual characters. I tried it, but I doesn't seem to generate a file for me... Same with "ios::binary" works, but that makes the file even bigger : -/
ʕ •ᴥ•ʔ
Re: Double to int errors
This actually gave me an idea, to the old method where we added images as a list of put pixels, how about no upload them as a list of pixel to buffer like: "gfx.ImageBuffer[0] = 0xFFFF1616;" and so on. It's probably smarter to add resource files, but a nice alternative? All you needed to do is make a separate class to hold the lists and then call them on initialization.
ʕ •ᴥ•ʔ
Re: Double to int errors
Hi Lux,
Have you tried adding a resource file and loading it with Gdi, it ain't easy. I have been tryiing for weeks LOL. There are very few resources on the net to help with this as well LOL.
Asimov
Have you tried adding a resource file and loading it with Gdi, it ain't easy. I have been tryiing for weeks LOL. There are very few resources on the net to help with this as well LOL.
Asimov
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk
Re: Double to int errors
Hi Chill,
My google-fu keeps getting directed to this page
http://www.codeproject.com/Articles/353 ... -using-GDI
but I don't understand a word of it LOL.
Asimov
My google-fu keeps getting directed to this page
http://www.codeproject.com/Articles/353 ... -using-GDI
but I don't understand a word of it LOL.
Asimov
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk